Skip to content

Latest commit

 

History

History
166 lines (142 loc) · 5.05 KB

File metadata and controls

166 lines (142 loc) · 5.05 KB

JAS (Java Angular Security)

License Java Spring Boot Angular Tailwind CSS PostgreSQL JWT Spring Security Docker

Project Description

JAS is a modern fullstack web application built with Angular 17 and Tailwind CSS in the frontend and Spring Boot 21 in the backend.

Status: Stable / Production-ready, under continuous development

⚠️ The logo was generated using AI.

It provides:

  • Secure login and registration system
  • Email verification
  • Password hashing
  • JWT-based authentication
  • User management

Additional features include multilingual support (DE/EN), dark/light mode, customizable color themes, account settings (change username/password), and prepared legal pages (Imprint/Privacy).

Emails can be personalized with app.name and app.mail.

Features

Category Features
Authentication Login/Logout, Registration, Password Reset, JWT Token
Security Password Hashing, Account Activation, Spring Security
UI/UX Dark/Light Mode, Blue Color Theme, Responsive, Navbar, Account Settings
Internationalization German/English via JSON files
Email Verification Code, Personalized Sender Information
Authorization User/Admin roles with different permissions

Tech Stack

  • Frontend: Angular 17, Tailwind CSS
  • Backend: Spring Boot 21, Spring Security, JWT
  • Database: PostgreSQL, Liquibase
  • Mail: SMTP (Gmail)
  • Personalization: app.name, app.mail

Project Structure

JAS/
 ├── backend/               → Java Spring Boot
 │    └── Dockerfile
 ├── frontend/              → Angular
 │    └── Dockerfile
 ├── docker-compose.yml
 └── README.md

Installation & Setup

Clone repository:

git clone https://github.com/R-100/JAS-Java.Angular.Security.git

Run Docker

Prerequisites

  • Docker Desktop

1. Edit Docker Compose Variables

JAS/
│── /docker-compose.yml 

Edit Variables

environment:
    - DB_SERVER=jas-postgres
    - POSTGRES_DB=jas
    - POSTGRES_USER=jas
    - POSTGRES_PASSWORD=jas
    - APPLICATION_NAME=JAS
    - MAIL_USERNAME=your_email@gmail.com
    - MAIL_PASSWORD=your_app_password
    - APPLICATION_MAIL=your_email@gmail.com
    - JWT_SECRET="my-super-secret-key-that-is-at-least-64-characters-long-123456"

2. Start Docker

Open the terminal the main objective of the project:

docker compose up

Run locally

Prerequisites

  • Java 21
  • Node.js >=18
  • npm / yarn
  • PostgreSQL
  • Maven

1. Create Database

CREATE DATABASE jas_db;

2. Environment Variables (IntelliJ Run Configuration)

JWT_SECRET=your_64_character_secret
DB_URL=jdbc:postgresql://localhost:5432/jas_db
DB_USERNAME=postgres
DB_PASSWORD=your_password
MAIL_USERNAME=your_email@gmail.com
MAIL_PASSWORD=your_app_password
APPLICATION_NAME=JAS
APPLICATION_MAIL=info@jas.com

The application attempts to reactivate the deactivated lines and deactivate the activated Docker lines by deleting them or converting them to comments.

3. Start Backend

cd backend
mvn spring-boot:run

Info Liquibase will automatically create the tables.

4. Start Frontend

cd frontend
npm install
ng serve

Info Frontend runs at: http://localhost:4200

Authentication Flow

  1. User registers
  2. Database stores: Username, Email (plain), Password (hashed)
  3. Verification code sent via email
  4. User enters code → Account activated
  5. Login generates JWT Token
  6. Token used for API requests

UI & User Features

  • Login / Logout
  • Registration
  • Password reset
  • Account activation
  • Change username & password
  • Switch language (DE/EN)
  • Dark/Light Mode persistence
  • Custom Blue Color Theme

Security Notice

  • Password hashing
  • JWT token authentication
  • Spring Security integration

Roles & Permissions

The application supports role-based access control:

  • User: Standard access to personal features
  • Admin: Extended permissions for management (Admin Area)

Warning
No guarantee of 100% security in production environments.