Featr Backend
A scalable backend foundation for the Featr feature request management platform built with Go, Gin-Gonic, and MongoDB.🚀 Quick Start
Prerequisites
- Go 1.21+
- MongoDB 7.0+
- Redis 7.2+ (optional, for caching)
Local Development
- Clone the repository
-
Copy environment variables:
-
Start dependencies with Docker:
-
Run the application:
http://localhost:8080
API Documentation
Health Check
Authentication
Projects
Feature Requests
Voting
Project Structure
Architecture Principles
- Layered Architecture: Clear separation between controllers, services, and repositories
- Dependency Injection: Services and repositories are injected into controllers
- Interface-Based Design: Repository interfaces allow for easy testing and database switching
- Middleware Support: Authentication, CORS, rate limiting, and logging
- Error Handling: Consistent error responses across all endpoints
- Security: JWT authentication, rate limiting, and CORS protection
Environment Variables
Database Schema
The application uses MongoDB with the following collections:users- User accounts and profilesprojects- Feature request projectsrequests- Individual feature requestsvotes- User votes on requestscomments- Comments on requests
Development Commands
Contributing
- Follow Go best practices and conventions
- Add tests for new functionality
- Update documentation for API changes
- Use conventional commit messages