Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gabrielamoura25/permission-system

It provides an efficient development experience and utilizes the latest technologies to ensure high performance. It enables users to manage and view details of their profiles.
https://github.com/gabrielamoura25/permission-system

fastify jest mongodb nodejs prisma react typescript vite

Last synced: 5 days ago
JSON representation

It provides an efficient development experience and utilizes the latest technologies to ensure high performance. It enables users to manage and view details of their profiles.

Awesome Lists containing this project

README

        

# Permission-System Project

The Permission-System is a full-stack web application built with [Vite](https://vitejs.dev/), [Prisma](https://www.prisma.io/), [MongoDB](https://www.mongodb.com/), [Node.js](https://nodejs.org/), [Fastify](https://www.fastify.io/) and [TypeScript](https://www.typescriptlang.org/). It provides an efficient development experience and utilizes the latest technologies to ensure high performance. It enables users to manage and view details of their profiles.

## Languages and Frameworks

### Frontend:

- Vite: The frontend is developed using Vite, a modern framework for building web applications with React.

- React: React is used for creating interactive and efficient user interfaces.

### Backend:

- Fastify: Fastify is a lightweight and efficient web framework for Node.js. It is used to create the backend of the application.

- Node.js: Node.js is the execution platform for server-side JavaScript.

- Prisma: Prisma is an Object-Relational Mapping (ORM) tool that facilitates interaction with databases. In this project, it is configured to connect to MongoDB.

- MongoDB: A NoSQL database that offers scalability and flexibility. Prisma is configured to work with MongoDB.

## Features and Functionalities

## Basic HTTP Authentication:

The application uses basic HTTP authentication to ensure security in requests.

## Unit Testing:

Unit tests are implemented to ensure code robustness. They can be executed using the `npm test` command in the frontend or backend directory.

## Installation

Make sure you have Node.js and npm installed on your system.

## Configuration and Execution

1. Clone the Repository:

```bash
git clone https://github.com/GabrielaMoura25/Permission-System.git
or
git clone [email protected]:GabrielaMoura25/Permission-System.git

cd Permission-System
```

2. Install Dependencies:

- Frontend Configuration:

```bash
cd frontend
npm install
```

- Backend Configuration:

```bash
cd backend
npm install
```

3. Start the Frontend and Backend:

- Frontend:

```bash
cd frontend
npm run dev
```

- Backend: Uses Prisma to interact with MongoDB. Here are the steps to initialize and populate the database:

```bash
cd backend
npm run dev
```

- The application will be available at http://localhost:5173.

## Testing

Run tests using the following command:

```bash
cd frontend # or cd backend
npm test
```
## Important

- Remember that to perform searches on the site, you must use the emails registered in the database.
- Data is already registered in the `prisma/seeds.ts` file.

## Populating the Database

To add more data to the database, you can edit the `prisma/seeds.ts` file with the desired data and then run the command:

```bash
npm run dev
```
This will ensure that the data is updated in the database.

Keep in mind that this application uses basic HTTP authentication. To make direct queries to the database, you can use tools such as Postman, Insomnia, NoSQL, or access MongoDB Atlas.

#### I hope you enjoy working with the project!