- GetActive
- Software Architecture
- Class Diagram
- Database Diagram
- Docker Environment Configuration
- Environment Configuration
- Development Guide
- Troubleshooting
- Important Notes
- Contribution Guidelines
GetActive helps university students overcome the challenge of finding and joining social or recreational groups. It offers a platform to discover, create, and join on-campus activities, making it easier to build connections. Students can register, verify their accounts, and manage their participation in multiple activities. The goal is to promote an active, socially connected campus experience.
The GetActive application is composed of modular components distributed across a client-server architecture. The system is decomposed into three main components: the frontend, the backend, and the database, each of which is containerized using Docker and deployed to AWS cloud platform. The architecture follows a layered design pattern within the backend and uses industry-standard frameworks and tools for development, deployment, and scalability.
- Database Service (db)
- Uses MySQL 8.0
- Port mapping: 3306:3306
- Data persistence: Uses Docker volume (mysql_data)
- Health check: Checks database connection status every 10 seconds
- Backend Service (backend)
- Based on Spring Boot 3.x
- Port mapping: 3232:3232
- Dependencies: Requires database service to be healthy
- Health check: Checks API health status every 10 seconds
- Frontend Service (frontend)
- Based on Node.js and React
- Port mapping: 80:80
- Uses Nginx as web server
- Dependencies: Requires backend service to be healthy
- Frontend: React, HTML5, CSS3, Axios/Fetch API (for REST communication)
- Backend: Java, Spring Boot, Spring Security, Spring Data JPA
- Database: MySQL
- Authentication: JWT (JSON Web Tokens)
- Deployment: Docker, GitHub, AWS, GitHub Actions
- Version Control: Git, GitHub
This code folder contains all source code and test code. This document provides detailed instructions for the Docker environment configuration and usage of the GetActive project. The project uses Docker Compose to manage multiple services, including frontend, backend, and database services.
- Install Docker
- Install Docker Compose
-
After cloning the project, navigate to the project root directory:
cd code
-
Start all services using Docker Compose:
docker-compose --profile prod up -d
-
Check service status:
docker-compose ps
-
Frontend application: http://localhost
-
Backend API: http://localhost:3232/v1
-
Database: localhost:3306
-
CURL Examples:
- Exec into the Docker container:
docker exec -it getactive-backend bash
-
Register curl -d '{"email":"jin@bu.edu", "username":"jin2022", "password": "Password123!"}' -H "Content-Type: application/json" -X POST http://localhost:3232/v1/register
-
Create Activity curl -d '{"name":"New Activity", "description":"description", "location": "location", "startDateTime": "2026-05-25 19:00", "endDateTime": "2026-05-25 19:59"}' -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ0eXBlIjoiUkVHSVNUUkFUSU9OX0NPTkZJUk1BVElPTiIsInN1YiI6ImppbjIwMjIiLCJpYXQiOjE3NTAwMzY2MTEsImV4cCI6MTc1MDAzODQxMX0.gPVUISr-o_IxWfIOEbFAeLHI2QPASZd43IciyV-qves" -X POST http://localhost:3232/v1/activity
-
Get Activities curl -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ0eXBlIjoiUkVHSVNUUkFUSU9OX0NPTkZJUk1BVElPTiIsInN1YiI6ImppbjIwMjIiLCJpYXQiOjE3NTAwMzY2MTEsImV4cCI6MTc1MDAzODQxMX0.gPVUISr-o_IxWfIOEbFAeLHI2QPASZd43IciyV-qves" -X GET http://localhost:3232/v1/activities
- Database name: getactive
- Username: root
- Password: password
- Port: 3306
- Service port: 3232
- Health check endpoint: /v1/health
- Database connection configuration in application.properties
- Web server port: 80
- API proxy configuration in nginx.conf
When code changes are made, services need to be rebuilt:
# Rebuild all services
docker-compose build
# Rebuild specific service
docker-compose build [service_name] # Example: docker-compose build backend
# View logs for all services
docker-compose logs
# View logs for specific service
docker-compose logs [service_name] # Example: docker-compose logs backend
# View logs in real-time
docker-compose logs -f
# Stop all services
docker-compose down
# Stop services and remove volumes
docker-compose down -v
- Port Conflicts
- Ensure ports 80, 3232, and 3306 are not in use by other services
- Use
lsof -i :[port]
to check port usage
- Service Startup Issues
- Check Docker logs:
docker-compose logs [service_name]
- Ensure all dependent services are running properly
- Verify environment variables and configuration files
- Database Connection Issues
- Ensure database container is running
- Check database connection configuration
- Verify database user permissions
- Frontend Access Issues
- Check Nginx configuration
- Ensure backend API is accessible
- Check browser console for error messages
- This configuration is for development environment only, not recommended for production use
- Database data is persisted through Docker volume, data won't be lost when containers are removed
- Services need to be rebuilt after code changes
- Ensure Docker and Docker Compose versions are compatible
- Test Docker configuration changes locally before committing
- Update this documentation when configuration changes are made
- Ensure all services can start and run properly before submitting code