How tkohei07/personal-project works
Main Components
• Frontend: The client directory contains the React SPA code along with its Dockerfiles, environment configuration, and coverage reports. Highlight the components layer (with its structured subdirectories such as components, hooks, contexts, services, etc.) that delivers the user experience.
• Backend: Although the file tree only shows the client folder, the README and the CI workflows (backend-ci.yml) indicate a separate Go/Gin-based server responsible for processing API requests, handling authentication (with JWT), and managing business logic.
• Database: PostgreSQL is used as the reliable data store. In production, it is hosted as an AWS RDS service.
• Infrastructure & Deployment: Components like Docker & Docker-compose, GitHub Actions for CI/CD, Terraform for infrastructure provisioning, and AWS services (ECS Fargate for running containers, ECR for image storage, and RDS for the database) play a central role.
• Auxiliary Components:
• Nginx is configured (client/nginx.conf) for serving static assets and reverse proxy handling.
• External APIs such as Google Maps (using the provided API key) enrich location-based features.
Relationships and Interactions
• The backend interacts with the PostgreSQL database (RDS) to store and retrieve study location data, user contributions (reviews, ratings, hours, favorites), and authentication details.
• Nginx serves as a reverse proxy for the frontend static content and might also assist with routing incoming traffic.
• CI/CD pipelines (as found in the .github/workflows directory) automate testing, building, and deployment of both the frontend and the backend.
• Docker and Docker-compose encapsulate the environment ensuring consistency across development and production.
• AWS services (ECS Fargate for container orchestration, ECR for image repositories, and RDS for the database) are interconnected, with Terraform scripts managing this infrastructure.
Architectural Patterns and Design Principles
• Separation of Concerns: Clearly separate frontend (React SPA) from backend services (Go & Gin), ensuring that each is independently deployable and scalable.
• Containerization: The use of Docker fosters consistent environments and manageable deployments.
• Microservices/Modular Architecture: Although not strictly divided into multiple microservices, the separation between client and server components—in addition to distinct service modules like authentication, location management, and review handling—illustrates good modular design.
• CI/CD Pipeline: The integration of GitHub Actions streamlines testing and deployment, ensuring continuous integration and reliable deployment.