Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

SAE 3.01 - Thomas, Adrien MaNaturothèque™; TS NextJS w/ Prisma

License

Notifications You must be signed in to change notification settings

UPECSchoolProjects/SAE3.01-Public

Repository files navigation

Next JS React Prisma Bootstrap NPM

SAE3.01-Logo

 

SAE3.01-Adranth

TEAM Adranth (Thomas, Adrien & Antoine) ; SAE 3.01

 

📌 Description

MaNaturothèque is a NextJS web app that allows consultation of the fauna & flora using TaxRef™ API with a twist, the ability to create an account and favorite taxa to your personal area for further consultation.

 

🔑 Key Features

  • Taxa Related

    • Term & Language-Based Taxa Search (also adjustable with a rank filter)
    • Taxa Image Scraping from INPN (when available)
    • Detailed Taxa Information (provided by TaxRef)
    • Personal / Favorite Area of saved Taxa (when connected)
  • Account Related

    • Secure Account Creation
      • Email verification
      • Password encryption (using BycryptJS)
      • Secure password enforcement
    • Login with Session Management & Renewal
    • Password Reset
  • Additional Features

    • Switch between dark & light color themes
    • Switch between French & English
    • Responsive CSS to improve tablet & mobile experience

 

🛠️ How to dev

Requirements

Setting up the Development Environment (Windows only)

  1. Ensure you have a local database mysql://root@localhost:3306/ running, to do so :

    1. Install XAMPP™
    2. Launch XAMPP Control Panel, turn on Apache & MySQL
  2. Clone the repository in Visual Studio Code or by running gh repo clone UUUUUwUUUUU/SAE3.01-Public

  3. Create a new .env file in root, then add and complete the following

    BASE_URL="http://localhost:3000/"
    SECRET_COOKIE_PASSWORD="..." // Can be generated using https://krenbot.github.io/pw-generator/
    SENDINBLUE_API_KEY="..." // Need to create an account on https://www.brevo.com/
  4. Install the project dependencies by running:

    npm i
     
  5. Run the following commands in the terminal:

    npx prisma migrate dev --name init
     
    npx prisma generate
     
  6. Start the development server by running:

    npm run dev
     

    Or build using:

    npm run launch
     

Note

Closing Visual Studio Code will also close the npm dev server.

  1. Open http://localhost:3000/ in your browser to access the app

 

🔧 Troubleshooting

Resetting Prisma Database

Warning

The following commands will reset your Prisma database. A prompt will ask for confirmation (y/n).

  1. Run the following commands:

    npx prisma migrate reset
     
    npx prisma migrate dev
     

 

Performing a Clean Package Installation (node_modules reset)

Important

This will delete your current /node_modules and reinstall the packages.

  1. Run the following command:

    npm ci