A Go-based REST API for Reward Gitters — a platform that helps developers discover open-source projects based on their skills and preferred programming languages. Users can also explore other developers in the community and receive rewardss.
- Discover open-source projects filtered by skills and languages
- Browse and connect with other developers
- GitHub OAuth authentication
- Set EVM wallet address for receiving rewards
- Redis caching for fast search performance
- Clean layered architecture
- Backend: Go
- Database: MongoDB
- Cache: Redis
- Architecture: Controllers, Services, Models, Routes, Middlewares
reward-gitters-back/
├── app/ # Core application logic
├── controllers/ # HTTP request handlers
├── database/ # MongoDB and Redis connections
├── middlewares/ # Authentication and other middlewares
├── models/ # Data models
├── routes/ # API route definitions
├── main.go
├── .air.toml # Live reload configuration
└── go.mod
- Go 1.21+
- MongoDB (local or Atlas)
- Redis server
-
Clone the repository
git clone https://github.com/DevMukhtarr/reward-gitters-back.git cd reward-gitters-back -
Install dependenciesbash
go mod tidy -
Create a .env file in the root with your configuration
PORT=8080
MONGO_LOCAL_URI=mongodb://localhost:27017
JWT_SECRET=your_super_secret_key
GITHUB_CLIENT_ID=XXXXXXXXXXXXXXXXXX
GITHUB_CLIENT_SECRET=XXXXXXXXXXXXXXXXX
GITHUB_TOKEN=ghp_XXXXXXXXXXXXXXXXXX
REDIS_ADDRESS=localhost:6379
REDIS_PASSWORD=
REDIS_DB=0
- Run the applicationWith live reload (recommended):
air
Without live reload:
go run main.go