A modern web application built for the Java Developer community. This project combines an elegant React frontend with a powerful Spring Boot backend.
- React 19.1.0 - Modern UI library
- TypeScript - Type-safe JavaScript
- Vite 6.3.5 - Fast build tool and dev server
- TailwindCSS 4.1.8 - Utility-first CSS framework
- Heroicons - Beautiful hand-crafted SVG icons
- Vitest - Lightning fast testing framework
- React Query - Data fetching and caching
- React Router - Client-side routing
- Framer Motion - Animation library
- Spring Boot 3.5.0 - Enterprise Java framework
- Java 17 - LTS version of Java
- Spring Security - Authentication and authorization
- Spring Data JPA - Data access layer
- PostgreSQL - Advanced open-source relational database
- Lombok - Reduces boilerplate code
- Maven - Dependency management and build tool
- JUnit 5 - Testing framework
- PostgreSQL - Primary database (Neon cloud)
- Docker & Docker Compose - Containerization
- Maven - Build automation
justDrinkJava/
├── client/ # Frontend (React + TypeScript)
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── hooks/ # Custom hooks
│ │ ├── pages/ # Page components
│ │ ├── utils/ # Utility functions
│ │ ├── api/ # API layer
│ │ ├── translations/ # i18n translations
│ │ ├── App.tsx # Main App component
│ │ └── main.tsx # Entry point
│ ├── package.json
│ └── vite.config.ts
├── server/ # Backend (Spring Boot)
│ ├── src/main/java/pl/justdrinkjava/JustDrinkJava/
│ │ ├── controller/ # REST controllers
│ │ ├── service/ # Business logic
│ │ ├── repository/ # Data access layer
│ │ ├── entity/ # JPA entities
│ │ ├── dto/ # Data Transfer Objects
│ │ ├── mapper/ # Object mapping
│ │ ├── config/ # Configuration classes
│ │ └── exception/ # Exception handling
│ ├── src/main/resources/
│ │ ├── application.properties
│ │ ├── application-local.properties
│ │ └── application-prod.properties
│ ├── Dockerfile
│ └── pom.xml
├── docker-compose.yml # Docker services
├── env.example # Environment variables template
└── README.md
- Node.js 18+ and npm
- Java 17 (JDK)
- Maven 3.6+
- Docker & Docker Compose (optional, for containerized development)
git clone https://github.com/your-username/justDrinkJava.git
cd justDrinkJavaCopy the environment template and configure your variables:
cp env.example .envEdit .env with your configuration:
# Environment Configuration
SPRING_PROFILES_ACTIVE=local
# Server Configuration
SERVER_PORT=8080
# Database Configuration (PostgreSQL)
SPRING_DATASOURCE_URL=postgresql://username:password@host:5432/database
SPRING_DATASOURCE_USERNAME=your_username
SPRING_DATASOURCE_PASSWORD=your_password
# JWT Configuration
APP_JWT_SECRET=your-super-secret-jwt-key-change-in-production
APP_JWT_EXPIRATION=86400000
# Frontend Configuration
VITE_API_URL=http://localhost:8080/api
# Logging Configuration
LOGGING_LEVEL_WEB=DEBUG
LOGGING_LEVEL_SQL=DEBUG
LOGGING_LEVEL_HIBERNATE_BINDER=TRACE
LOGGING_LEVEL_APP=DEBUG
# CORS Configuration
CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173
CORS_ALLOWED_METHODS=GET,POST,PUT,DELETE,OPTIONS
CORS_ALLOWED_HEADERS=*
CORS_ALLOW_CREDENTIALS=true
# Actuator Configuration
MANAGEMENT_ENDPOINTS_INCLUDE=health,info,metrics
MANAGEMENT_HEALTH_SHOW_DETAILS=always- Create a free account at Neon
- Create a new database
- Copy the connection string to your
.envfile
# Install PostgreSQL and create database
createdb justdrinkjava
# Update .env with local connection string
SPRING_DATASOURCE_URL=postgresql://localhost:5432/justdrinkjava# Start the application
docker-compose up --build
# The backend will be available at http://localhost:8080
# The frontend will be available at http://localhost:5173cd server
# Run with Maven
./mvnw spring-boot:run
# Or on Windows
mvnw.cmd spring-boot:runcd client
# Install dependencies
npm install
# Start development server
npm run dev# Start all services
docker-compose up --build
# Start in detached mode
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down# Build and run backend only
cd server
docker build -t justdrinkjava-server .
docker run -p 8080:8080 --env-file ../.env justdrinkjava-server
# Frontend runs locally (not containerized)
cd client
npm run devnpm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run test # Run tests with Vitest
npm run test:ui # Run tests with UI
npm run test:coverage # Run tests with coverage
npm run lint # Lint code./mvnw spring-boot:run # Run application
./mvnw test # Run tests
./mvnw clean test jacoco:report # Tests with coverage report
./mvnw clean package # Build JAR
./mvnw spring-boot:build-image # Build Docker image# Windows
cd server && coverage.bat
# Linux/macOS
cd server && ./coverage.sh- Test Coverage: 85% (3,892/4,594 instructions)
- Test Status: ✅ 740/740 tests passing (100% success)
- Coverage Report: Available at
server/target/site/jacoco/index.html
- Framework: Vitest + React Testing Library + MSW
- Test Status: 12/15 tests passing (80% success)
- Coverage: Available with
npm run test:coverage
- Backend: Add endpoints in controllers, implement services
- Frontend: Create components, hooks, and API calls
- Database: Update entities and repositories
- Testing: Add unit and integration tests
# Backend
./mvnw clean verify
# Frontend
npm run lint
npm run test- ✅ Responsive Design - Works on all devices
- ✅ Dark/Light Mode - Theme switching
- ✅ Internationalization - Multi-language support
- ✅ Authentication - JWT-based security
- ✅ RESTful API - Clean API design
- ✅ Data Validation - Input validation
- ✅ Error Handling - Comprehensive error management
- ✅ Testing - Unit and integration tests
- ✅ Docker Support - Containerized development
- ✅ PostgreSQL - Modern database with advanced features
- Development:
http://localhost:8080/api - Production: Your deployed API URL
GET /api/health # Application health status
POST /api/auth/login # User authentication
POST /api/auth/register # User registration
GET /api/posts # Get all posts
GET /api/posts/{id} # Get post by ID
GET /api/categories # Get all categories
GET /api/users/profile # Get user profile
# Login example
curl -X POST http://localhost:8080/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"user","password":"password"}'
# Authenticated request
curl -X GET http://localhost:8080/api/users/profile \
-H "Authorization: Bearer YOUR_JWT_TOKEN"SPRING_PROFILES_ACTIVE=prod
SPRING_DATASOURCE_URL=your-production-database-url
APP_JWT_SECRET=your-production-jwt-secret
CORS_ALLOWED_ORIGINS=https://your-domain.com
LOGGING_LEVEL_WEB=WARN
LOGGING_LEVEL_SQL=WARN
MANAGEMENT_HEALTH_SHOW_DETAILS=never# Build production images
docker-compose -f docker-compose.prod.yml build
# Deploy
docker-compose -f docker-compose.prod.yml up -d- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow existing code conventions
- Write tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting PR
- Backend Coverage: 85% (740/740 tests passing)
- Frontend Coverage: 80% (12/15 tests passing)
- Total Lines of Code: 4,594+ (backend) + frontend
- Languages: Java, TypeScript, SQL
- Components: 46+ backend classes, 50+ frontend components
- User Management System - Complete user profiles and settings
- Admin Dashboard - Administrative interface
- Real-time Features - WebSocket implementation
- Mobile App - React Native version
- CI/CD Pipeline - Automated testing and deployment
- Performance Optimization - Caching and optimization
- API Rate Limiting - Request throttling
- Advanced Search - Elasticsearch integration
This project is licensed under the MIT License. See the LICENSE file for details.
- Project: Just Drink Java
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Spring Boot Team for the excellent framework
- React Team for the powerful UI library
- Neon for reliable PostgreSQL hosting
- Open source community for inspiration
Made with ❤️ and ☕ by the Java Developer Community