Welcome, and thank you for your interest in contributing to the TeacherFund website!
There are many ways to contribute, beyond writing code. The goal of this document is to provide a high-level overview of how you can get involved.
We want to hear about any problems with the website. Whether it be a visual bug, a functional issue (e.g. links don't work, server errors when donating or logging in, etc.), or just a suggestion to make things more maintainable, please log an issue in this repository.
Before you create a new issue, please do a search in open issues to see if the issue or feature request has already been filed.
If you find your issue already exists, make relevant comments and add your reaction. Use a reaction in place of a "+1" comment:
- 👍 - upvote
- 👎 - downvote
File a single issue per problem and feature request. Do not enumerate multiple bugs or feature requests in the same issue.
Do not add your issue as a comment to an existing issue unless it's for the identical input. Many issues look similar, but have different causes.
These would be very helpful to include:
- Reproducible steps (1... 2... 3...) that cause the issue
- What you expected to see, versus what you actually saw
- Images, animations, or a link to a video showing the issue occurring
If you are interested in writing code to fix issues, read the below to understand our project structure and set up your development environment.
Please note: all design should be made with our home page style in mind.
In order to avoid duplicate work and to save you from wasting time, please comment in an open issue your intention to code out the resolution to that issue. If it isn't obvious how that issue will be solved, outline what you plan to do to make sure it's in line with the maintainers' vision for the project.
The website is written in React using Next.js from Zeit. Chakra UI is used as a React component library. Magic is used for authentication. Stripe is used for payment processing.
- components
- Custom React components
- containers
- Higher-order React components
- hooks
- React hooks
- lib
- Utilities used by the serverless functions
- pages
- React component containers that correspond to actual pages
- api
- Vercel serverless functions to manage authentication / donations
- public
- Images and SCSS files
- test
- Unit tests
- utils
- Reusable utility functions
- Install Node.js and NPM
>= 8.x
- Fork this repository, clone it locally, and keep it in sync by following the instructions here
- Install dependencies by running
npm install
in the project directory - Create a local environment file named
.env.local
- Add
NEXT_PUBLIC_DEVELOPMENT=1
to the file. This will allow you to skip authentication during local development, since the Magic authentication environment variables are not public. - Add
ENCRYPTION_SECRET=<any 32 character string>
to your .env.local. Such as:ENCRYPTION_SECRET=the_space_needle_is_gorgeous_this_time_of_year
- If you need Stripe to work while developing locally, contact @joelwass and he can provide the Stripe test keys
- Add
- Start the website locally by running
When it's done building, access it at this link: http://localhost:3001/
npm run dev
Commit any code changes to a branch (e.g. fix/header
or feature/donate-form
).
When you've finished making changes and committed the changes into your branch, you can open a pull request. Please reference the issue you have solved in your pull request.
- Code should pass linting by Standard. Run
npm run lint
to confirm there are no linting errors. You can have Standard auto-fix linting issues by runningnpx standard --fix
. - Bugfixes should be accompanied by tests to avoid regression
Your contributions to open source, large or small, make projects like this possible. Thank you for taking the time to contribute.