Matcha is a social matchmaking application developed as part of the 42 curriculum. The platform provides advanced user interactions, real-time chat, notifications, and matchmaking features using a modern tech stack.
- Features
- Tech Stack
- Architecture
- Quick Start
- Setup
- Services & Endpoints
- .env Template
- Testing with Dummy Data
- JWT-based authentication
- Secure session management
- Email verification system
- Password strength validation
- Upload 1โ5 profile pictures
- Interactive location picker with map
- Real-time age calculation
- Bio and interests management
- Like/Pass system with instant feedback
- Intelligent matchmaking algorithm
- Browse history tracking
- Block & report functionality
- Filter by age, location, interests
- Sort by distance or compatibility
- Real-time search results
- Pagination support
- Match notifications
- Profile view alerts
- Like/Unlike updates
- Message notifications
- WebSocket-based instant delivery
- Real-time messaging
- Chat only with matched users
- Message history
- Online/Offline status
- Typing indicators
- User report management
- Ban/Unban functionality
- View reported users with reasons
Framework : Spring Boot 3.5.4
Language : Java 17
Security : Spring Security + JWT
Real-time : WebSocket (STOMP)
API : GraphQL + REST
Build : Gradle
Key Dependencies:
spring-boot-starter-graphql- GraphQL APIspring-boot-starter-websocket- Real-time communicationspring-boot-starter-security- Authentication & Authorizationjjwt- JWT token managementspring-boot-starter-mail- Email notifications
Framework : Angular 20.2
Language : TypeScript 5.0
UI Library : Standalone Components
State : Signals API
Routing : Angular Router
Forms : Reactive Forms
Key Features:
zxcvbn- Password strength validationleaflet- Interactive maps- WebSocket client for real-time updates
- GraphQL client integration
Graph DB : Neo4j 5.0
โโ User profiles & relationships
โโ Matchmaking graph algorithms
โโ Like/Block/Match connections
Document DB : MongoDB
โโ Chat messages
โโ Notifications
โโ User activity logs
Reverse Proxy : Nginx
Containerization : Docker & Docker Compose
Orchestration : Docker Compose with health checks
matcha/
โโโ backend/ # Spring Boot backend with GraphQL API
โโโ angular/ # Angular frontend
โโโ nginx/ # Nginx configuration
โโโ neo4j/ # Neo4j initialization scripts and dummy user generator
โโโ docker-compose.yml
โโโ .env # Local environment variables (not in repo)
โโโ README.md
graph TB
subgraph "Client Layer"
A[Angular Frontend<br/>Port 4200]
end
subgraph "Gateway Layer"
B[Nginx<br/>Port 80]
end
subgraph "Application Layer"
C[Spring Boot API<br/>Port 8080]
D[GraphQL Endpoint]
E[REST API]
F[WebSocket Server]
end
subgraph "Data Layer"
G[(Neo4j<br/>Port 7687)]
H[(MongoDB<br/>Port 27017)]
end
A -->|HTTP/WS| B
B -->|Proxy| C
C --> D
C --> E
C --> F
D -->|Users & Relationships| G
E -->|Users & Relationships| G
F -->|Chat & Notifications| H
style A fill:#DD0031,color:#fff
style B fill:#009639,color:#fff
style C fill:#6DB33F,color:#fff
style G fill:#008CC1,color:#fff
style H fill:#47A248,color:#fff
- Docker & Docker Compose
- Git
git clone <repository-url>
cd matcha
cp .env.example .env # Edit with your credentials
docker-compose up --build๐ That's it! Access the app at http://localhost
git clone <repository-url>
cd matchaCreate .env file in the root directory:
cp .env.example .envEdit .env with your credentials (see .env Template below)
docker-compose up --build# Generate 500 dummy users for testing
cd neo4j
python test.py
docker exec -it matcha-neo4j bash
cypher-shell -u {neo4j_username} -p {neo4j_password} -f /docker-entrypoint-initdb.d/init_profiles.cypher| Service | URL | Description |
|---|---|---|
| ๐จ Frontend | http://localhost |
Angular application |
| ๐ Backend API | http://localhost:8080/api |
Spring Boot REST API |
| ๐ GraphQL | http://localhost:8080/api/graphql |
GraphQL playground |
| ๐ต Neo4j Browser | http://localhost:7474 |
Graph database UI |
| ๐ข MongoDB | mongodb://localhost:27017 |
Document database |
| ๐๏ธ Mongo Express | http://localhost:8081 |
MongoDB admin UI |
Create a .env file with the following configuration:
#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# ๐ฅ๏ธ Server Configuration
#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SERVER_PORT=8080
APP_URL=http://localhost
FRONTEND_URL=http://localhost
#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# ๐ JWT Configuration
#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
JWT_TYPE=Bearer
JWT_SECRET=your_super_secret_jwt_key_min_256_bits_recommended
JWT_EXPIRATIONMS_ACCESSTOKEN=3600000 # 1 hour
JWT_EXPIRATIONMS_REFRESHTOKEN=86400000 # 24 hours
#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# ๐ MongoDB Configuration
#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SPRING_DATA_MONGODB_URI=mongodb://admin:password@mongodb:27017/matcha
SPRING_DATA_MONGODB_USERNAME=admin
SPRING_DATA_MONGODB_PASSWORD=password
ME_CONFIG_MONGODB_SERVER=mongodb
#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# ๐ต Neo4j Configuration
#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SPRING_NEO4J_URI=bolt://neo4j:7687
SPRING_NEO4J_AUTHENTICATION_USERNAME=neo4j
SPRING_NEO4J_AUTHENTICATION_PASSWORD=your_neo4j_password
#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# ๐ง Mail Server Configuration (Gmail Example)
#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SMTP_MAIL_HOST=smtp.gmail.com
SPRING_MAIL_PORT=587
SPRING_MAIL_USERNAME=[email protected]
SPRING_MAIL_PASSWORD=your_app_password
SPRING_MAIL_PROTOCOL=smtp
SPRING_MAIL_PROPERTIES_MAIL_SMTP_AUTH=true
SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE=true
SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_REQUIRED=true
#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# ๐ File Upload & GraphQL
#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
FILE_UPLOAD_PATH=/uploads
GRAPHQL_PATH=/graphql
โ ๏ธ Security Note: Never commit.envto version control. Keep your credentials safe!
Generate 500 realistic test users with the included Python script:
cd neo4j
python test.py
# Access Neo4j container
docker exec -it matcha-neo4j bash
cypher-shell -u {neo4j_username} -p {neo4j_password} -f /docker-entrypoint-initdb.d/init_profiles.cypher