Welcome to the getting started page! Here is all you need to know to get this repo up and running on your local machine, as well as good collaborative coding practices
- Setup for All Developers
- Helpful commands
- Project Structure
- Design
- Key Features
- API endpoints
- Services Used
- Clone this repository
git clone <repo-url>
- Run
npm i
at the root of the repository - Create a .env file and retrieve secrets from your tech lead
- Install IDE Extensions
- Enable format on save in your IDE
- Familiarize yourself with Helpful Commands, the Project Structure, and the steps for contributing.
npm run dev
: Start your local development environment at http://localhost:3000npm run lint
: make sure Prettier and ESLint passnpm run lint:fix
: make sure Prettier and ESLint pass and try to automatically fix all issues (some ESLint issues must be resolved manually)git stash
: Temporarily remove all local changes to a branch and save them. Good when you need to hop to another branch without committing your current code.git stash apply
: Reapply most recent git stash.git merge orgin/master
: Pull all changes from the main branch to yours, good for resolving merge conflicts.
- .github Github Actions CI/CD and Issue/PR templates
- docs Documentation, including getting-started + contributing info.
- public Assets for frontend Read More
- src All application code
This is a Next.js project bootstrapped with create-next-app
.
Admin
- Create/Update/Delete New event for registered users to sign up for. (/src/app/admin/manage-events)
- Create/Delete Blogs (appears in blog page). (/src/app/admin/blog) Note: For date, click the box in the calendar (you might need to select the box after today)
- Create new resource to appear in resources page. (/src/app/admin/resources)
- Manage members; view/edit an organized list of users, including contact information. (/src/app/admin/members)
- Send emails by user type (volunteers, members, partners/donors, or individual). (/src/app/admin/email)
- View donation history. (/src/app/admin/donations)
- View event history, including signees + relevant information. (/src/app/admin/eventHistory)
User Authentication
- Create account (/src/app/createAccount)
- Login to account (/src/app/login)
- Forgot password (/src/app//forgotPassword)
- Reset password (/src/app/resetPassword)
Navigation & Other Features
- Learn Go See's Story (src/app//about)
- Donate to Go See Foundation (/src/app/donate)
- View blog page- three most recent articles (/src/app/blog)
- View blog archive - all older articles (/src/app/blog/archive)
- View resources and supporters of Go See Foundation (/src/app/resources)
- Sign up for an upcoming event (/src/app/eventSignup)
- /aws: Uploading files to Amazon S3 and storing the file URLs in a database
- /blog: Create and Fetch Blogs.
- /blog/[blogID]: Delete Blogs.
- /donations: Fetching Donations.
- /events: Exclusive admin priviledge; Create new event, Fetch events.
- /events[eventName]: Exclusive admin priviledge; Fetch individual event, Delete Events.
- /eventSignUp: Creates a new event signee in database with signup details.
- /eventSignUp/[eventName]: Fetching individual event.
- /forgot-password: Conditional depending on database info (ie, checks whether email exists).
- /login: Authenticates user by verifying their email and password. If the credentials are correct, it generates a JSON Web Token (JWT) for the session, sets an HTTP-only cookie with the JWT, and responds with a success message.
- /registration: Allows new users to register by providing their details. It validates the input, hashes the password for security, and stores the user information in the database. If any required fields are missing or if an error occurs, it returns an appropriate error message.
- /resources: Creating new resource, fetching all resources.
- /stripe: Handling stripe-related donation.
- /user/[userID]: Exclusive admin priviledge; fetching and deleting an individual user.
- /user: Exclusive admin priviledge; fetching all users (including fetching by user type).
- Next.js: We used Next.js to lessen the overhead of deploying a separate back-end. It provided tooling that would otherwise have been installed seperately (built-in routing, serverless functions, middleware, etc.)
- MongoDB: MongoDB offers high performance, low-latency performance, and real-time analysis. It supports a flexible data model that can handle a variety of data formats, including structured and unstructured data.
- AWS Services: S3 for image storage.
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.
- NextAuth Documentation - learn about authentication and authorization with NextAuth
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!