dating-sim-go
is a backend application built in Go, designed to power a dating simulation experience. It provides features like user authentication, swipe mechanics, profile management, and more, all built with a focus on performance and scalability.
for Technical Document please go to this link
- Routes for user login, registration, and session management.
- Allows users to interact with potential matches.
- Optimized using Redis for caching swipe data and enhancing performance.
- Supports creating, updating, and retrieving user profiles.
- Handles premium features or in-app enhancements via dedicated routes.
- A
/health
endpoint to monitor application readiness and status.
- Go (Golang): The core programming language, chosen for its speed and scalability.
- Redis: Used for caching dynamic data like swipe interactions.
- SQL Database (PostgreSQL/MySQL): Persistent storage for user data and settings.
- Gorilla Mux: A router library for clean and organized API endpoint management.
- Custom Middleware: Handles additional request/response processes such as logging and authentication.
- Environment Variables: Managed through a custom
dotenv
package.
-
Handler-Based Structure:
- Clean separation of concerns for each feature (e.g.,
Swipe
,Auth
,Profile
). - Grouped and organized routes for modularity.
- Clean separation of concerns for each feature (e.g.,
-
Custom Redis Client:
redis.RedisClient
is initialized at application startup and shared across handlers.
-
Database Initialization:
- A dedicated initialization process (
db.Conn()
) ensures reliable database connections.
- A dedicated initialization process (
-
Graceful Shutdown:
- Resources like Redis connections are cleaned up during server shutdown.
-
Clone the repository:
git clone https://github.com/your-username/dating-sim-go.git cd dating-sim-go
-
Set up environment variables in a
.env
or just copy.env.example
file:REDIS_ADDR=localhost:6379 REDIS_PASSWORD= REDIS_DB=0 DB_HOST=your-database-host DB_USER=your-database-user DB_PASSWORD=your-database-password DB_NAME=your-database-name
-
Install dependencies:
go mod tidy
-
Run the application:
go run main.go
-
Clone the repository:
git clone https://github.com/your-username/dating-sim-go.git cd dating-sim-go
-
Set up environment variables in a
.env
or just copy.env.example
file:REDIS_ADDR=localhost:6379 REDIS_PASSWORD= REDIS_DB=0 DB_HOST=your-database-host DB_USER=your-database-user DB_PASSWORD=your-database-password DB_NAME=your-database-name
-
Build and start the services using Docker Compose:
docker-compose up --build
-
Access the application at http://localhost:5000.
All testing of endpoints included at dating-sim-go.postman_collection.json
using postman and other alternatives
- GET
/health
- Login, Registration, and Logout functionality.
- Handles interactions with potential matches.
- Manage user profile information.
- Access premium or enhanced features.
- Gamification:
- Badges, levels, and rewards to enhance user engagement.
- AI Matching:
- A recommendation system based on user preferences and behavior.
- Real-Time Communication:
- WebSocket integration for live chat and notifications.
- frhan23: Project Owner and Main Developer
Feel free to contribute to this project by submitting issues or pull requests. 😊
This project is licensed under the MIT License.
Enjoy building your dating simulation app! 💕