Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goel-anubhav/angular-springboot-auth-app
angular-login-app
https://github.com/goel-anubhav/angular-springboot-auth-app
Last synced: about 1 month ago
JSON representation
angular-login-app
- Host: GitHub
- URL: https://github.com/goel-anubhav/angular-springboot-auth-app
- Owner: goel-anubhav
- Created: 2024-09-06T10:16:30.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-09T10:32:51.000Z (4 months ago)
- Last Synced: 2024-10-13T04:31:04.277Z (3 months ago)
- Language: HTML
- Size: 1.22 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JWT Authentication with Angular, Java Spring Boot, and PostgreSQL
Welcome to the JWT Authentication project! This repository contains the implementation of a secure authentication system using Angular for the frontend, Java Spring Boot for the backend, and PostgreSQL for the database.
## Table of Contents
- [Features](#features)
- [Architecture](#architecture)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [Project Structure](#project-structure)
- [Contributing](#contributing)
- [License](#license)## Features
- **JWT Authentication**: Secure user authentication using JSON Web Tokens.
- **Role-based Access Control**: Different roles with specific permissions.
- **RESTful APIs**: Clean and efficient REST APIs using Spring Boot.
- **Secure Storage**: Passwords are hashed and stored securely in PostgreSQL.
- **Responsive UI**: Modern and responsive user interface with Angular.
- **Error Handling**: Robust error handling on both frontend and backend.## Architecture
This project follows a three-tier architecture:
- **Frontend**: Angular application for the user interface.
- **Backend**: Java Spring Boot application for handling business logic and authentication.
- **Database**: PostgreSQL for data persistence.## Getting Started
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
### Prerequisites
- **Node.js**: [Download and install Node.js](https://nodejs.org/)
- **Angular CLI**: Install Angular CLI globally using `npm install -g @angular/cli`
- **Java 11**: [Download and install Java 11](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html)
- **PostgreSQL**: [Download and install PostgreSQL](https://www.postgresql.org/download/)### Installation
1. **Clone the repository**:
\`\`\`bash
git clone https://github.com/IssaEhtishamAli/jwt-auth-angular-springboot.git
cd JwtAuthentication
\`\`\`2. **Backend Setup**:
- Navigate to the \`backend\` directory:
\`\`\`bash
cd backend
\`\`\`
- Update \`application.properties\` with your PostgreSQL credentials.
- Build the project using Maven:
\`\`\`bash
mvn clean install
\`\`\`
- Run the Spring Boot application:
\`\`\`bash
mvn spring-boot:run
\`\`\`3. **Frontend Setup**:
- Navigate to the \`frontend\` directory:
\`\`\`bash
cd ../frontend
\`\`\`
- Install Angular dependencies:
\`\`\`bash
npm install
\`\`\`
- Run the Angular application:
\`\`\`bash
ng serve
\`\`\`## Usage
1. Open your web browser and navigate to \`http://localhost:4200\`.
2. Register a new user or log in with existing credentials.
3. Access protected routes based on user roles.## Project Structure
``` plaintext
JwtAuthentication
├── backend/
│ ├── src/
│ │ ├── main/
│ │ │ ├── java/com/yourusername/jwtauthentication/
│ │ │ ├── resources/
│ │ │ │ └── application.properties
│ │ └── test/
│ └── pom.xml
├── frontend/
│ ├── src/
│ │ ├── app/
│ │ ├── assets/
│ │ ├── environments/
│ │ └── index.html
│ └── angular.json
└── README.md
```