MEAN Stack with Docker
A full-stack TypeScript contact management application with comprehensive Docker integration.
A modern, full-stack TypeScript contact management system built with the MEAN stack (MongoDB, Express.js, Angular, Node.js) and containerized with Docker. Perfect for learning full-stack development or as a starting point for your own projects!
๐ What Youโll Learn
- TypeScript throughout the entire stack
- Angular 19 with reactive forms, guards, and SSR
- Express.js with TypeScript for a robust API
- MongoDB integration with Mongoose
- JWT Authentication for secure user management
- Docker containerization for development and production
- Nginx as a load balancer and API gateway
- CI/CD with GitHub Actions
๐ Getting Started in 30 Seconds
Prerequisites
Quick Start Commands
Clone the repository:
git clone https://github.com/nitin27may/mean-docker.git
Navigate to project folder:
cd mean-docker
Create environment file:
cp .env.example .env
Start the application:
docker-compose -f docker-compose.nginx.yml up
Thatโs it! Visit http://localhost in your browser.
Login with:
- Username:
nitin27may@gmail.com
- Password:
P@ssword#321
๐๏ธ System Architecture
Single Entry Point Architecture
When using the docker-compose.nginx.yml
configuration, all traffic flows through a single port (80):
- Single Exposed Port: Only port 80 is exposed to the outside world
- Unified Access Point: Both UI and API requests enter through Nginx
- Intelligent Routing:
- Requests to
/api/*
are proxied to the Express.js service - All other requests are served by the Angular frontend
- Requests to
- Simplified Deployment: No need to manage multiple public endpoints
- Enhanced Security: Internal services remain isolated from direct external access
๐ป Key Features
User Authentication
- JWT-based secure login and registration
- Protected routes with Angular guards
- Token-based API authorization
- Password change functionality
Contact Management
- Create, read, update, and delete contacts
- Responsive design for mobile and desktop
- Form validation with custom error messages
- Search, sort, and paginate contacts
๐ Documentation
For more detailed information, explore these documentation pages:
- Docker Guide
- Local Development Guide
- MongoDB Setup
- Architecture Overview
- API (Expressjs)
- Frontend (Angular)
- Load Balancer (Nginx)
- Future Roadmap
๐ค Contributing
We welcome contributions!
If youโd like to contribute to this project:
- For bug reports, please use our Bug Report Template
- For feature requests, please use our Feature Request Template
- For general issues or questions, please visit our Issues page
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.