A simple todos app base on graphql and mongodb and Go
Disclaimer: This project is a learning playground and not yet production-ready. It's designed for educational purposes and
experimentation features
- Language Go (Golang) 1.21+
- Graphql gqlgen
- CLI management urfave
- database Mongodb
- Caching system redis
Prerequisites
Go 1.24+
Docker (optional)Local Development Setup
- Clone the Repository
git clone https://github.com/yourusername/gql-mongo-todos-sample.git
cd gql-mongo-todos-sample
- Configuration
# Copy environment template
cp config.example.yaml config.yaml
# Edit file with your specific configurations
nano config.yaml- Environment Variables
export ENV=dev # select mode dev | release
export FILE_PATH=/path/to/config/file/config.yaml- Build & Run Local Execution
# Build the application
go build .
# Start the server
./gql-mongo-todos-sample serve
# Create admin user
./gql-mongo-todos-sample create-admin -u admin -p securePassword./gql-mongo-todos-sample
# output
NAME:
todos - todos backend base on graphql and mongodb
USAGE:
todos [global options] [command [command options]]
COMMANDS:
create-admin creating new admin user
serve start running server
up migrations up
down migrations down
force force migration version
migration-version return migration version
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
Docker Deployment
# Build and start services
docker compose build
docker compose up -d
# View logs
docker compose logs -f- secure password hashing base
- JWT Authentication
- email: daniel-k84@outlook.com