A full-stack web application perfect for learning Docker containerization. This project includes a React frontend and Node.js/Express backend.
docker-learning/
├── frontend/ # React frontend application
│ ├── public/
│ ├── src/
│ └── package.json
├── backend/ # Node.js/Express backend API
│ ├── server.js
│ ├── package.json
│ └── .env.example
└── README.md
- Modern React application with hooks
- Axios for API communication
- Responsive design with CSS Grid
- Real-time data fetching from backend
- Interactive UI to test backend connectivity
- RESTful API with full CRUD operations
- Express.js with security middleware (Helmet, CORS)
- In-memory data store (easily replaceable with database)
- Health check endpoint
- Comprehensive error handling
- Request logging with Morgan
cd frontend
npm install
npm startFrontend will run on http://localhost:3000
cd backend
npm install
npm startBackend will run on http://localhost:5000
GET /- API documentationGET /api/data- Get all itemsPOST /api/data- Create new itemGET /api/data/:id- Get specific itemPUT /api/data/:id- Update itemDELETE /api/data/:id- Delete itemGET /health- Health check
This project is designed to help you learn Docker concepts:
- Containerizing Applications: Create Dockerfiles for both frontend and backend
- Multi-Container Applications: Use Docker Compose to run both services together
- Networking: Learn how containers communicate with each other
- Environment Variables: Manage configuration across different environments
- Volumes: Persist data and share files between host and containers
- Optimization: Learn about multi-stage builds and image optimization
- Create a
Dockerfilefor the frontend - Create a
Dockerfilefor the backend - Create a
docker-compose.ymlto orchestrate both services - Add environment variables and configuration
- Implement data persistence with volumes
- Optimize your Docker images
- React 18
- Axios for HTTP requests
- CSS3 with modern layout techniques
- Node.js
- Express.js
- Helmet (security)
- CORS
- Morgan (logging)
- Dotenv (environment variables)
Happy Docker Learning! 🐳