This project is an over-engineered full-stack application designed to integrate multiple software components for experimentation and testing.
This repository contains a full-stack application with a frontend, backend, database, and proxy server. The entire application is containerized using Docker and orchestrated with Docker Compose.
backend/
Dockerfile
package.json
src/
controllers/
userController.ts
db.ts
index.ts
routes/
userRoutes.ts
tsconfig.json
certs/
localhost.crt
localhost.key
db/
init.sql
docker-compose.yml
frontend/
.env
Dockerfile
package.json
postcss.config.js
public/
index.html
src/
App.tsx
CapybaraPage.tsx
index.css
index.tsx
tailwind.config.js
tsconfig.json
proxy/
default.conf
Dockerfile
README.md
- Framework: React with TypeScript.
- Styling: Tailwind CSS.
- Server: Nginx.
- Configuration:
.env
.
- Framework: Express.js with TypeScript.
- Database: PostgreSQL.
- Environment Variables: Defined in
docker-compose.yml
.
- Service: PostgreSQL.
- Initialization Script:
db/init.sql
.
- Service: Nginx.
- Purpose: Handles HTTPS and routes traffic.
The services are defined in docker-compose.yml
. Below is a summary:
- Frontend:
- Port:
80
.
- Port:
- Backend:
- Port:
3001
. - Dependencies: Database.
- Port:
- Database:
- Port:
5432
. - Persistent storage:
postgres_data
.
- Port:
- Proxy:
- Ports:
80
,443
.
- Ports:
- PostgreSQL Data: Persistent storage for database data.
docker-compose up --build
docker-compose down
- Frontend:
http://localhost
- Backend:
http://localhost:3001
- Database:
localhost:5432
- Proxy:
https://localhost
- Install dependencies:
cd backend npm install
- Start development server:
npm run dev
- Install dependencies:
cd frontend npm install
- Start development server:
npm start
The following diagram illustrates the application's architecture: