Skip to content

matiasADiazPerez/FibonacciSpiralBackend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fibonacci Spiral Backend

This repository contains the implementation of the Fibonacci Spiral Matrix challenge. The API offers the following features:

  • User CRUD Operations: Complete CRUD functionality for managing users.
  • Login and JWT Authorization: Secure endpoints with login and JWT-based authorization.
  • Spiral Fibonacci Matrix Calculation: Generates a matrix of size c x r (columns x rows), with customizable rows and columns (up to 100). The matrix is filled with Fibonacci numbers arranged in a spiral pattern.

The API is built using Golang, employing go-chi as the router and gorm as the database client. PostgreSQL serves as the database engine. Both the API and the database are containerized using Docker.

Usage

  1. Create a .env file with the following configurations:
POSTGRES_HOST_AUTH_METHOD=trust
POSTGRES_USER={Some user}
POSTGRES_PASSWORD={a password}
POSTGRES_HOST=spiral_db
JWT_SECRET={a secret}
  1. To deploy the containers and serve the API at localhost:8080, use the command make app-deploy
  2. To run unit tests, execute: make test
  3. To check the code for linting issues and view errors and warnings related to code style: make lint

For detailed API usage instructions, refer to the API documentation served in http://localhost:8080/docs/.

Module Diagrams

API Module Diagram

Untitled Diagram drawio

API Infrastructure Diagram

Untitled Diagram drawio(1)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published