This project was initialized using npm create vite@latest
with Vanilla JavaScript and TypeScript. It is a web application built with an MVC architecture, providing robust authentication and user management features.
To get started with the project, follow these steps:
-
Clone the repository:
git clone https://github.com/jucrojasba/typescript-book-api-manager.git
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
The console will generate a link. Click on this link to open the web application in your browser.
The application includes the following features:
- Login/Register: Secure user authentication for both registration and login.
- Session Persistence: Session persistence through tokens to keep users logged in.
- Role-Based Access Control: Protect routes based on user roles (user, admin).
- Home View: A welcoming home page.
- Dynamic Menu: Menu items displayed based on the user’s role.
- User Administration: Admin users can view and manage user roles (user or admin).
- CRUD Operations: Full Create, Read, Update, and Delete functionality for book management.
- Encryption: User information is encrypted and stored in local storage.
- Protected Routes: Only authorized users can access certain routes.
- MVC Architecture: Ensures a clean separation of concerns.
- Router Implementation: Routes are protected and managed through a router.
- Guard Services: Services that guard routes and ensure security.
Credentials and other sensitive information are stored in the .env file.
root/
├── src/
│ ├── assets/
│ │ ├── icons/
│ │ └── images/
│ ├── components/
│ │ ├── confirmations/
│ │ ├── create-book/
│ │ ├── modals/
│ │ ├── navbar/
│ │ └── update-book/
│ ├── controllers/
│ ├── helpers/
│ ├── models/
│ ├── services/
│ └── views/
│ ├── private/
│ │ ├── home/
│ │ └── admin/
│ └── public/
│ ├── login/
│ ├── register/
│ └── not-found/