Skip to content

Viet-Vibe-Foundation/main-web

Repository files navigation

This is a Next.js project to create a web application template for Viet Vibe Foundation (VVF) non-profit organization.

Getting Started

  1. Packages installment (we will mainly use yarn for packages management):

    npm install --global yarn
    yarn install --immutable
    yarn dev
  2. Development:

    a. Add all the environment variables from this [document] to the '.env' file before starting local development (https://docs.google.com/spreadsheets/d/1HWzT14xOBQg8zwtJ3RfTpdCH8ENshvoSRAO7LeGP1IM/edit?usp=sharing) (only accessible to officers who have VVF gmail account)

    b. Open http://localhost:3000 in your browser to see the template home page. Then navigate to the page mentioned in your tasks and start editing. The website is auto-updated as you edit the file and make new changes.

    c. For the database, run the following command to open local database studio (ensure DATABASE_URL is in .env, refer to this document):

    npx prisma studio

    d. Before pushing the code, always remember to run the build command below (some errors only show as warning in development mode but will cause build to fail):

    yarn run build

    e. Some important tips:

    • When you add/modify any packages in package.json, please update yarn.lock by running:

      yarn install --mode=update-lockfile
  3. Pull Request & Deployment:

    a. This project uses AWS Amplify and Vercel to host the production and dev branches:

    b. In addition, the branch is integrated with Vercel and Amplify bots to build every PR's preview automatically. Please always verify your PR after the build is finished:

    • For Vercel, you will need a Vercel account to request access to the preview: image
    • For AWS, it is open to the public: image

    c. Some important tips: :

    • Make sure all checks have passed in your PR: image
    • Always check and test your code in the preview of at least one of the builds of Amplify and Vercel (preferably Amplify because we host our main web there)
  4. Conventions & Wiki:

  • There are conventions and rules about coding we need to follow to ensure our project's efficiency and cleanliness
  • Please thoroughly read through the Wiki

Learn More

This template is written in Next.js 15 using the Next.js App Router.

To learn more about Next.js, see:

Additionally, this template uses the following libraries and features: