Candidates-Portal Documentation
This documentation provides an overview of the Candidates portals* project, which is built using Next.js, TypeScript, Tailwind CSS, Prisma, and a Postgres container (Docker).
To clone this repository:
git clone [email protected]:badhon252/Candidates-portal.git
To run this project:
docker-compose up
npm run dev
To run this project in production mode:
npm run build && npm run start
Table of Contents
Project Setup
- Initialize a Next.js app with TypeScript.
- Set up ESLint and Prettier for this project.
- Initialize Prisma.
- Create a user model on Prisma.
- Connect Prisma with a Postgres container.
- Add a Docker YAML file, which will generate a Postgres database.
UI Phase
- Design a simple UI using Tailwind CSS.
- Add input fields for name, email, and occupation.
- Implement an "Add User" button that saves the entered data to the database and updates the user table.
- Display all users in a table with columns for name, email, occupation, and a delete button.
- Implement the delete button to remove the user from the database and update the user table.
- Fetch user data from the database using Prisma to display in the UI.
Database Phase
- Store user data in the database upon submission.
- Delete user data from the database upon deletion.
Testing Phase
- Add a simple Jest test, such as a hello world, or add two number test.
Git Hooks Phase
- Set up conventional commit, commitlint, and commitizen for proper commit messages.
- Set up Husky to run test and lint commands before every commit.
Type Declaration Phase
- Use proper type declarations throughout the project.
This revised plan provides a clear and concise outline for the project, which should ensure that it is completed on time and with the necessary features and functionality.