Production-ready REST API for a job marketplace built with Go and MongoDB.
Prerequisites
- Go 1.24+
- MongoDB (Atlas or local)
Installation
git clone https://github.com/t5810m/go-mongodb-api.gitcd go-mongodb-api
Setup
cp .env.example .env- Edit
.envwith your MongoDB URIgo run cmd/seed/seed.go— Create and seed databasego run cmd/main.go— Start serverServer runs on
http://localhost:8080
Docker
cp .env.example .env- Edit
.envwith your MongoDB URIdocker-compose up --buildServer runs on
http://localhost:8080
- 60+ REST endpoints for job marketplace
- Pagination, filtering, sorting on all list endpoints
- Layered architecture (Handler → Service → Repository → DB)
- 14 entities: Users, Jobs, Applications, Skills, JobCategories, JobSkills, CandidateSkills, Articles, Countries, EducationLevels, JobTypes, KnowledgeLevels, LocationAvailabilities, Resumes
- JWT authentication with role-based access (admin / recruiter / candidate)
- Input validation with field-level error messages
- MongoDB integration with indexes and clean patterns
- ~97% test coverage on middleware, ~98% on services
Go · MongoDB · Chi Router · godotenv · Validator · Docker
Zoran Makrevski — zoran@makrevski.com
Feel free to reach out for questions, suggestions, or collaboration.
MIT - See LICENSE