sfbrigade / support-sfusd

Support SF Schools web site (dev deployment at: https://support-sfusd.vercel.app)
https://supportsfschools.org
5 stars 2 forks source link

About Support SF Schools

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.


Tech Stack

Next.js Typescript React Tailwind CSS HTML CSS


Mapbox

You need to sign up for Mapbox to run the project locally.

  1. Goto https://www.mapbox.com and sign up

  2. It will ask you for billing information, but it is pay as you go. You have 500 instances before you are charged.


Prisma

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

Model changes

Prisma documentation on prototyping schema

Seeding

Environment File

Create an environment file to pass your default public token from Mapbox

  1. Create a new file, .env, in the main directory (with the README.md file)

  2. Add your default public token to your .env

    NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN=your_default_public_token
  3. 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


Get Started

To run this project locally, please perform the following steps:

  1. Clone the repository

    git clone https://github.com/sfbrigade/support-sfusd.git
  2. Install dependencies at the root directory

    npm install
  3. Run the development server

    npm run dev
  4. Open http://localhost:3000 with your browser to see the result

    • Alternatively, you can open http://[LAN_IP]:3000 on another device, such as a phone on the same network. Replace 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.


Further Notes to help you out

Visit our Notion for Engineers

Gotchas

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).