Welcome to the PV Frontpage Redux repo! This is the source code of our website. Before contributing to the codebase you MUST read the following information. If you're a fullstack Next.js pro you can quickly skim this. NOTE: since migrating to sql and a centralized database, you now also require the api setup on your local machine, and running in concurrence with the website.
This is a Next.js project bootstrapped with create-next-app.
If you're new to Next.js development please start by reading the docs to get a understanding of how a Next.js site works. The underlying reactive web development framework is React, the linked page has a great tutorial for getting you aquainted quickly.
The language used in this project is Typescript which is a typed version of Javascript. Please take a moment to review Typescript basics and best practices before getting started.
By continuing with development you are agreeing that you understand these frameworks and will attempt to work within the best practices and conventions.
Check out a new branch from main before you begin working on any new feature. If you do not understand the previous sentence see git - the simple guide for a primer.
BEFORE running the server you must have Node.js installed on your machine. We officialy use the 20.19.1 LTS version of Node but backward compatability means you should be able to use any LTS >= 20.19.1 to run the server.
AFTER installing Node.js you MUST install pnpm to manage the dependencies for this project. We do NOT use npm, if you use npm your builds will fail!
The easiest way to install pnpm is via npm after installing Node.js. Otherwise visit the linked page above to install it on your machine.
npm install -g pnpm@latest-10First, install the dependencies,
pnpm installNext, check the .env.example file you'll see the list of required variables for proper function of the development server. Below is how you should configure each variable as of writing. All requests for credentials should be directed to Joops or sH3llH0und on discord.
# $PROJECT_DIR/.env
# Does not need to change
SITE_URL="https://example.com"
# api vars
PV_WEBSITE_API_URL="http://localhost:8080"Finally, run the development server
pnpm devOpen http://localhost:3000 with your browser to see the result. Upon saving your work the server automatically (hot) reloads with your changes.
Only certain users have the ability to deploy branches on Vercel. Create a PR and request help from @somejoops, a deputy, or assistant, or attend coding team meeting Mondays at 5PM PST / 8PM EST to have your PR approved.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
Make sure you run the setup steps first:
npx playwright install --with-depspnpm run test