Hello! Thanks for checking out Support SF Schools. We started this project in summer 2022 to solve a big problem in San Francisco. Schools need help. And people who live or work in SF want to support local schools, but they don’t know how. We are building a website to help solve that.
You need to sign up for Mapbox to run the project locally.
Goto https://www.mapbox.com and sign up
It will ask you for billing information, but it is pay as you go. You have 500 instances before you are charged.
We're using Prisma as our ORM. If you're unsure of what it is or what it does here is a link to the prisma documentation regarding how it works and why its used
Prisma documentation on prototyping schema
If you want to make changes to any model in prisma, the schema file within the prisma folder is where those changes will take place
Once you have made the changes to a model you're going to run this command in your terminal
npx prisma db push
This will execute the changes required to make the vercel postgres database schema reflect the state of our prisma schema
After running npx prisma db push
we lose all the data so we need to seed our database with all the school information, run this command in your terminal after making changes to the model
npx prisma db seed
Create an environment file to pass your default public token from Mapbox
Create a new file, .env
, in the main directory (with the README.md file)
Add your default public token to your .env
NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN=your_default_public_token
For the prisma configuration you're going to need the vercel postgres URL, add both of these to your .env
file, for security we will be adding these to the notion
POSTGRES_PRISMA_URL=check_notion_page
POSTGRES_URL_NON_POOLING=check_notion_page
To run this project locally, please perform the following steps:
Clone the repository
git clone https://github.com/sfbrigade/support-sfusd.git
Install dependencies at the root directory
npm install
Run the development server
npm run dev
Open http://localhost:3000 with your browser to see the result
LAN_IP
with the IP address of your development server, which can be found inside of the "LAN url" part of the npm run dev
log.Visit our Notion for Engineers
For Tailwind CSS, do not use h-screen
as it is broken on mobile Safari. Instead, use our custom class h-dvh-with-fallback
until which time the official h-dvh
alone suffices (fallbacks are not needed).