This backend, built with Go, Gin, and MongoDB, serves as the backbone for both the users' mobile app and the SaaS CRM administrators' platform. The project leverages technology to modernize fitness, allowing users to improve their fitness through monitoring workouts, nutrition, and activities. Administrators can seamlessly generate workout and nutritional plans, monitor sales, and manage other tasks. The project is developed with three environments: development, production, and staging.
Clone this project to your local machine:
git clone <repository-link>-
Setup your local environment variables:
VIGOR_DB_URIVIGOR_DB_NAMEJWT_SECRET_KEY
You can use the files .env.development and .env.staging as example on how to locally setup environment variables globally on your computer.
-
Configure the
.air.tomlfile: Ensure that you correctly set up the environment under theenvkey:- For development:
VIGOR_ENV=dev - For staging/testing:
VIGOR_ENV=test
- For development:
For production, the environment setup is intended to be handled within the CI/CD pipeline as contributors merge the code to the main branch.
To be determined, not yet entirely set up.
-
Install dependencies:
go mod tidy
-
Start the server with live reloading
air
-
Start the server without live reloading:
go run main.go
Run unit tests:
go test -v ./tests/unit_tests/"desired subdirectory"To generate postamn_collection.json file, run:
go run scripts/generate_postman_collection.go- Docker Configuration
- CI/CD Configuration
- Some tests need to be rewritten to fit the updated codebase