A full-stack web application for booking makeup artist appointments, featuring user authentication, appointment management, Google Calendar integration, and admin dashboard functionality.
Glamour Studio is a modern, responsive booking system designed for makeup artists and their clients. The application provides a seamless experience for customers to browse services, book appointments, and manage their bookings, while giving administrators powerful tools to manage their business.
- Java 21 with Spring Boot 3.4.5
- Spring Security with JWT authentication
- Spring Data JPA for data persistence
- H2 Database (in-memory) for development, PostgreSQL for production
- OAuth2 integration (Google Authentication)
- Google Calendar API for appointment synchronization
- Spring Mail for email notifications
- Maven for dependency management
- Angular 20 with TypeScript
- Angular Material for UI components
- RxJS for reactive programming
- JWT handling for authentication
- Responsive design with SCSS
- Docker & Docker Compose for containerization
- Git version control
- User registration with email verification
- Traditional login/logout functionality
- Google OAuth integration
- Role-based access control (USER/ADMIN)
- JWT token management
- Password encryption with BCrypt
- User profile management
- PayU payment gateway integration
- Secure payment order creation
- Webhook notifications with MD5 signature verification
- Payment status tracking (PENDING, COMPLETED, CANCELED)
- Automatic payment confirmation
- Automatic invoice generation and download (Zoho Books)
- Integration with appointment system
- SMS notifications
- Email notifications
- Notification preferences
- Service browsing and selection
- Available time slot viewing
- Appointment booking
- Appointment status tracking (PENDING, CONFIRMED, COMPLETED, CANCELLED)
- Appointment cancellation and rescheduling
- Admin appointment management
- OAuth2 flow for Google Calendar access
- Automatic calendar event creation
- Calendar synchronization
- Token management and refresh
- Appointment overview and management
- User management
- Service management
- Availability slot configuration
- Admin-only access controls
- Professional landing page with portfolio showcase
- Responsive design for all devices
- Material Design components
- Interactive forms with validation
- Modern, accessible UI/UX
- Error handling and user feedback
- RESTful API architecture
- Database migrations and seeding
- Environment-based configuration
- CORS configuration for frontend-backend communication
- Request/response validation
- Comprehensive error handling
IWA/
βββ iwa_backend/ # Spring Boot backend
β βββ src/main/java/com/hszadkowski/iwa_backend/
β β βββ config/ # Security, CORS, JWT configuration
β β βββ controllers/ # REST API endpoints
β β βββ dto/ # Data Transfer Objects
β β βββ exceptions/ # Custom exception handling
β β βββ models/ # JPA entities
β β βββ repos/ # Repository interfaces
β β βββ services/ # Business logic services
β βββ src/main/resources/
β β βββ application*.properties # Environment configs
β β βββ data.sql # Database seeding
β βββ pom.xml # Maven dependencies
βββ iwa-frontend/ # Angular frontend
β βββ src/app/
β β βββ components/ # Angular components
β β βββ guards/ # Route guards
β β βββ interfaces/ # TypeScript interfaces
β β βββ services/ # Angular services
β β βββ utils/ # Utility functions
β βββ package.json # npm dependencies
βββ db/ # Database Docker configuration
βββ docker-compose.yml # Multi-container setup
βββ user-stories.md # Project requirements
- Java 21
- Node.js 18+
- Maven (or use the included wrapper)
- ngrok (required for PayU webhook functionality) - Download here
The recommended way to run the application is using Docker Compose, which sets up PostgreSQL database and all services automatically.
-
Clone the repository
git clone <repository-url> cd IWA
-
Configure environment variables
Copy the example environment file:
cp .env.docker.example .env.docker
Edit
.env.dockerfile with your configuration. See the Configuration section below for detailed setup instructions. -
Start the application with Docker
docker-compose up --build
π‘ This will start PostgreSQL database, backend, and frontend in containers.
-
Expose backend with ngrok (REQUIRED for PayU webhooks) (in a new terminal)
ngrok http 8080β οΈ Important: Copy the HTTPS forwarding URL (e.g.,https://abc123.ngrok-free.app) and update yourPAYU_NOTIFY_URLin the.env.dockerfile:PAYU_NOTIFY_URL=https://your-ngrok-url.ngrok-free.app/api/payments/notifyThen restart the containers:
docker-compose down docker-compose up
π‘ Why ngrok? PayU sends payment notifications (webhooks) to your backend. Since PayU servers need to reach your local machine, ngrok creates a secure tunnel to expose your localhost:8080 to the internet.
-
Access the application
- Frontend: http://localhost:4200
- Backend API: http://localhost:8080
- PostgreSQL Database: localhost:5432
-
Stop the application
docker-compose down
If you prefer to run the backend locally without Docker (uses H2 in-memory database):
-
Set the application profile to
localEdit
iwa_backend/src/main/resources/application.propertiesand ensure the active profile is set tolocal:spring.profiles.active=local -
Configure environment variables
Create
iwa_backend/.envfile with your configuration. See the Configuration section below for detailed setup instructions. -
Start the backend
cd iwa_backend ./mvnw spring-boot:run
π‘ The backend uses H2 in-memory database with
localprofile - no external database setup needed! -
Expose backend with ngrok (REQUIRED for PayU webhooks) (in a new terminal)
ngrok http 8080Update your
PAYU_NOTIFY_URLin the.envfile and restart the backend. -
Start the frontend (in a new terminal)
cd iwa-frontend npm install # First time only ng serve
-
Access the application
- Frontend: http://localhost:4200
- Backend API: http://localhost:8080
- Backend via ngrok: https://your-ngrok-url.ngrok-free.app
- H2 Database Console: http://localhost:8080/h2-console (for local development)
The application comes with pre-seeded users for testing:
| Password | Role | |
|---|---|---|
alice@acme.com |
admin123 |
ADMIN |
bob@acme.com |
user123 |
USER |
The backend supports two profiles:
local- Uses H2 in-memory database (for local development without Docker)dev- Uses PostgreSQL database (for Docker deployment)
Docker uses profile dev with PostgreSQL database.
Copy the example environment file and edit it:
cp .env.docker.example .env.dockerThen configure .env.docker with your values:
# Database Configuration
POSTGRES_USER=user
POSTGRES_PASSWORD=your_secure_password
POSTGRES_DB=service_db
# JWT (REQUIRED)
JWT_SECRET_KEY=your_secret_key_here
JWT_EXPIRATION=86400000
# Email (REQUIRED)
SUPPORT_EMAIL=your_email@gmail.com
APP_PASSWORD=your_gmail_app_password
OR
# Mail Gun Email (REQUIRED IF YOU WANT TO USE MAILGUN)
MAILGUN_HOSTNAME=smtp.mailgun.org
MAILGUN_PORT=587
MAILGUN_LOGIN=
MAILGUN_PASSWORD=
# Google Calendar OAuth (optional)
GOOGLE_CALENDAR_CLIENT_ID=your_client_id
GOOGLE_CALENDAR_SECRET=your_client_secret
GOOGLE_AUTH_CLIENT_ID=your_auth_client_id
GOOGLE_AUTH_FRONTEND_CLIENT_ID=your_frontend_client_id
# PayU Configuration (REQUIRED for payments)
PAYU_BASE_URL=https://secure.snd.payu.com
PAYU_OAUTH_CLIENT_ID=your_payu_client_id
PAYU_OAUTH_CLIENT_SECRET=your_payu_client_secret
PAYU_POS_ID=your_payu_pos_id
PAYU_SECOND_KEY_MD5=your_payu_second_key
# Zoho Invoicing Service
ZOHO_CLIENT_ID=
ZOHO_CLIENT_SECRET=
ZOHO_REFRESH_TOKEN=
ZOHO_ORGANIZATION_ID=
ZOHO_API_BASE_URL=https://www.zohoapis.eu/invoice/v3
ZOHO_AUTH_URL=https://accounts.zoho.eu/oauth/v2/token
ZOHO_GENERIC_CUSTOMER_ID=
# Twilio SMS Service (REQUIRED FOR SMS NOTIFICATIONS)
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_PHONE_NUMBER=
# β οΈ IMPORTANT: Use ngrok HTTPS URL here, NOT localhost!
# Run: ngrok http 8080
# Then copy the HTTPS URL (e.g., https://abc123.ngrok-free.app)
PAYU_NOTIFY_URL=https://your-ngrok-url.ngrok-free.app/api/payments/notify
β οΈ Critical for PayU Webhooks: ThePAYU_NOTIFY_URLMUST be a publicly accessible HTTPS URL. Runngrok http 8080to create a tunnel and use the provided HTTPS URL.
The backend uses profile local when running locally without Docker.
Create iwa_backend/.env file with:
# JWT (REQUIRED)
JWT_SECRET_KEY=your_secret_key_here
JWT_EXPIRATION=86400000
# Email (REQUIRED)
SUPPORT_EMAIL=your_email@gmail.com
APP_PASSWORD=your_gmail_app_password
OR
# Mail Gun Email (REQUIRED IF YOU WANT TO USE MAILGUN)
MAILGUN_HOSTNAME=smtp.mailgun.org
MAILGUN_PORT=587
MAILGUN_LOGIN=
MAILGUN_PASSWORD=
# Google Calendar OAuth (optional)
GOOGLE_CALENDAR_CLIENT_ID=your_client_id
GOOGLE_CALENDAR_SECRET=your_client_secret
GOOGLE_AUTH_CLIENT_ID=your_auth_client_id
GOOGLE_AUTH_FRONTEND_CLIENT_ID=your_frontend_client_id
# PayU Configuration (REQUIRED for payments)
PAYU_BASE_URL=https://secure.snd.payu.com
PAYU_OAUTH_CLIENT_ID=your_payu_client_id
PAYU_OAUTH_CLIENT_SECRET=your_payu_client_secret
PAYU_POS_ID=your_payu_pos_id
PAYU_SECOND_KEY_MD5=your_payu_second_key
# Zoho Invoicing Service
ZOHO_CLIENT_ID=
ZOHO_CLIENT_SECRET=
ZOHO_REFRESH_TOKEN=
ZOHO_ORGANIZATION_ID=
ZOHO_API_BASE_URL=https://www.zohoapis.eu/invoice/v3
ZOHO_AUTH_URL=https://accounts.zoho.eu/oauth/v2/token
ZOHO_GENERIC_CUSTOMER_ID=
# Twilio SMS Service (REQUIRED FOR SMS NOTIFICATIONS)
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_PHONE_NUMBER=
# β οΈ IMPORTANT: Use ngrok HTTPS URL here, NOT localhost!
# Run: ngrok http 8080
# Then copy the HTTPS URL (e.g., https://abc123.ngrok-free.app)
PAYU_NOTIFY_URL=https://your-ngrok-url.ngrok-free.app/api/payments/notify
β οΈ Critical for PayU Webhooks: ThePAYU_NOTIFY_URLMUST be a publicly accessible HTTPS URL. Runngrok http 8080to create a tunnel and use the provided HTTPS URL.
π‘ Note: H2 is an in-memory database, so all data is lost when the application stops. For persistent data, use Docker with PostgreSQL.
Environment settings in iwa-frontend/src/environments/:
- API endpoints
- Google OAuth client ID
- Production/development flags
- Business analytics dashboard
- Revenue tracking
- Customer insights
- Appointment statistics
- Performance metrics
- Photo portfolio management system
- Before/after photo uploads
- Customer review system
- Multi-language support
- Dark/light theme toggle
- Two-factor authentication (2FA)
- Rate limiting
- Advanced user permissions
- Audit logging
- Smart appointment scheduling
- Personalized service recommendations
- Automated customer support chatbot
- Demand forecasting
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Found a bug or have a feature request? We'd love to hear from you!
- Check if the issue already exists in our Issues section
- Make sure you're using the latest version of the application
- Try to reproduce the issue with minimal steps
- Go to the Issues page
- Click "New Issue"
- Search existing issues for similar problems
- For urgent issues, mention
@Koorbikin your issue
This project is licensed under the MIT License - see the LICENSE file for details.
- Hubert Szadkowski (Koorbik) - Full Stack Developer