Skip to content

Danielk84/gql-mongo-todos-sample

Repository files navigation

gql-mongo-todos-sample

Project Overview

A simple todos app base on graphql and mongodb and Go

🚀 Project Status

Disclaimer: This project is a learning playground and not yet production-ready. It's designed for educational purposes and
experimentation features

🛠 Technology Stack

  • Language Go (Golang) 1.21+
  • Graphql gqlgen
  • CLI management urfave
  • database Mongodb
  • Caching system redis

🚀 Quick Start

Prerequisites

Go 1.24+
Docker (optional)

Local Development Setup

  1. Clone the Repository
git clone https://github.com/yourusername/gql-mongo-todos-sample.git
cd gql-mongo-todos-sample
  1. Configuration
# Copy environment template
cp config.example.yaml config.yaml

# Edit file with your specific configurations
nano config.yaml
  1. Environment Variables
export ENV=dev # select mode dev | release
export FILE_PATH=/path/to/config/file/config.yaml
  1. 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

🔐 Security Features

  • secure password hashing base
  • JWT Authentication

Contact

About

simple todos api base on Go, gqlgen, mongodb and redis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors