A full-stack web application for automobile distribution management, built with Spring Boot, Next.js, PostgreSQL, and deployed with Docker and Kubernetes.
- Full-Stack Architecture: Spring Boot backend with Next.js frontend
- Database: PostgreSQL for reliable data persistence
- Image Management: Cloudinary integration for image storage
- Email Service: SMTP email notifications
- Containerization: Docker and Docker Compose support
- Orchestration: Kubernetes deployment configurations
- Admin Dashboard: Secure admin interface for management
- Framework: Spring Boot
- Database: PostgreSQL 17
- ORM: JPA/Hibernate
- Security: Spring Security
- Email: Spring Mail (SMTP)
- Image Storage: Cloudinary
- Framework: Next.js (React)
- Language: TypeScript
- Styling: Modern CSS
- Containerization: Docker
- Orchestration: Kubernetes
- Database: PostgreSQL
Before you begin, ensure you have the following installed:
- Docker and Docker Compose
- Node.js (v18 or higher)
- Java 17 or higher (for local development)
- kubectl (for Kubernetes deployment)
-
Clone the repository
git clone https://github.com/dila72/EAD.git cd EAD -
Configure environment variables
cp .env.example .env
Edit
.envand fill in your configuration values:- Database credentials
- Email settings (Gmail SMTP)
- Cloudinary credentials
- Admin credentials
-
Start the application
On Linux/Mac:
chmod +x docker-start.sh ./docker-start.sh
On Windows:
docker-start.bat
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
cd backend
# Configure backend/.env.example
./mvnw clean install
./mvnw spring-boot:runcd frontend
npm install
npm run devThe project includes a complete Docker Compose setup:
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop all services
docker-compose down
# Stop and remove volumes
docker-compose down -v- postgres: PostgreSQL database (Port 5432)
- backend: Spring Boot API (Port 8080)
- frontend: Next.js application (Port 3000)
For production deployment on Kubernetes, refer to K8S_DEPLOYMENT.md for detailed instructions.
EAD/
βββ backend/ # Spring Boot application
β βββ src/
β βββ Dockerfile
β βββ pom.xml
βββ frontend/ # Next.js application
β βββ src/
β βββ Dockerfile
β βββ package.json
βββ kubernetes/ # Kubernetes manifests
βββ docker-compose.yml # Docker Compose configuration
βββ .env.example # Environment variables template
βββ README.md
Key environment variables to configure:
Database
POSTGRES_DB: Database namePOSTGRES_USER: Database usernamePOSTGRES_PASSWORD: Database password
Backend
BACKEND_PORT: Backend server port (default: 8080)ADMIN_USERNAME: Admin usernameADMIN_PASSWORD: Admin password
Frontend
FRONTEND_PORT: Frontend port (default: 3000)NEXT_PUBLIC_API_URL: Backend API URL
Email (Gmail)
MAIL_HOST: SMTP hostMAIL_PORT: SMTP portMAIL_USERNAME: Your emailMAIL_PASSWORD: App password
Cloudinary
CLOUDINARY_CLOUD_NAME: Your cloud nameCLOUDINARY_API_KEY: Your API keyCLOUDINARY_API_SECRET: Your API secret
- Always use strong passwords for production
- Never commit
.envfiles to version control - Use app passwords for Gmail SMTP
- Keep Cloudinary credentials secure
cd backend
./mvnw spring-boot:runcd frontend
npm run devcd backend
./mvnw testcd frontend
npm testOnce the backend is running, access the API documentation at:
- Swagger UI: http://localhost:8080/swagger-ui.html
- API Docs: http://localhost:8080/api-docs
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- dila72 - Initial work - GitHub
- Spring Boot community
- Next.js team
- PostgreSQL team
- Docker and Kubernetes communities
For support, please open an issue in the GitHub repository.
Built with β€οΈ using Spring Boot, Next.js, and PostgreSQL