|
1 | | -# AuthAngularApp |
| 1 | +# Angular JWT Authentication System |
2 | 2 |
|
3 | | -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.0. |
| 3 | +## Screenshots |
4 | 4 |
|
5 | | -## Development server |
| 5 | +<div align="center"> |
| 6 | + <img src="./screenshot/login.png" alt="Angular Login Page" width="300" style="margin-right: auto"> |
| 7 | + <img src="./screenshot/register.png" alt="Angular Registration Page" width="300"> |
| 8 | +</div> |
6 | 9 |
|
7 | | -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. |
| 10 | +## Overview |
8 | 11 |
|
9 | | -## Code scaffolding |
| 12 | +This project is an Angular-based authentication system using JSON Web Tokens (JWT). It provides a robust and secure way of handling user authentication in Angular applications. |
10 | 13 |
|
11 | | -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. |
| 14 | +## Features |
12 | 15 |
|
13 | | -## Build |
| 16 | +- **User Registration**: Allows new users to create an account. |
| 17 | +- **User Login**: Enables users to log in to the application. |
| 18 | +- **Authenticated User Data Retrieval**: Displays data of the authenticated user. |
| 19 | +- **Toasts for Notifications**: Uses a toaster component for displaying messages. |
| 20 | +- **Reactive Forms**: Utilizes Angular Reactive Forms for handling form inputs. |
| 21 | +- **Bootstrap Styling**: Styled with Bootstrap for a responsive and modern UI. |
| 22 | +- **HTTP Interceptor**: Includes an interceptor to add `withCredentials` to all backend requests. |
14 | 23 |
|
15 | | -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. |
| 24 | +## Getting Started |
16 | 25 |
|
17 | | -##Running unit tests |
| 26 | +### Prerequisites |
18 | 27 |
|
19 | | -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). |
| 28 | +- Node.js |
| 29 | +- Angular CLI |
20 | 30 |
|
21 | | -## Running end-to-end tests |
| 31 | +## Installation |
22 | 32 |
|
23 | | -Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. |
| 33 | +1. **Clone the repository**: |
| 34 | + ```bash |
| 35 | + git clone <repository-url> |
| 36 | + ``` |
24 | 37 |
|
25 | | -## Further help |
| 38 | +2. **Navigate to the project directory**: |
| 39 | + ```bash |
| 40 | + cd <project-name> |
| 41 | + ``` |
26 | 42 |
|
27 | | -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. |
| 43 | +3. **Install dependencies**: |
| 44 | + ```bash |
| 45 | + npm install |
| 46 | + ``` |
| 47 | + |
| 48 | +4. **Run the application**: |
| 49 | + ```bash |
| 50 | + ng serve |
| 51 | + ``` |
| 52 | + |
| 53 | +5. **Open your browser** and navigate to `http://localhost:4200`. |
| 54 | + |
| 55 | +## Usage |
| 56 | + |
| 57 | +### Registration |
| 58 | + |
| 59 | +1. Navigate to the **Registration** page. |
| 60 | +2. Fill in the required fields. |
| 61 | +3. Submit the form to create a new user account. |
| 62 | + |
| 63 | +### Login |
| 64 | + |
| 65 | +1. Navigate to the **Login** page. |
| 66 | +2. Enter your credentials. |
| 67 | +3. Submit the form to log in. |
| 68 | + |
| 69 | +### Viewing Authenticated User Data |
| 70 | + |
| 71 | +- Once logged in, navigate to the **Authenticated User** component to view your data. |
| 72 | + |
| 73 | +## Contact |
| 74 | + |
| 75 | +For any queries or contributions, feel free to connect with me: |
| 76 | + |
| 77 | +- [](mailto:ambinintsoa.business@gmail.com) |
| 78 | +- [](https://linkedin.com/in/ambinintsoa-zo/) |
| 79 | + |
| 80 | +## Acknowledgments |
| 81 | + |
| 82 | +- Angular Team for the amazing framework. |
| 83 | +- Bootstrap for the UI components. |
| 84 | +- Community contributors and everyone who supports this project. |
0 commit comments