A centralized educational platform tailored to professors seeking to access and share resources that facilitate active learning and engagement.
To install the project, follow these steps:
- Clone the repository
git clone [email protected]:shanebrownescope/engr-science-teaching-resources.git - Create
.env.localfile in the root directory of the project and add the following environment variables:
# AWS RDS MySQL setup
HOST=
DB_USER=
DB_PASSWORD=
DB_NAME=
# AWS S3 setup
AWS_REGION=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_BUCKET_NAME=
# Next.auth setup
AUTH_SECRET=
# Nodemailer setup
NODEMAILER_EMAIL=
NODEMAILER_PASSWORD=
# Other
SITE_URL=
TEAM_NAME=You have to get your own AWS RDS, AWS S3, and Nodemailer information.
To generate AUTH_SECRET run:
npx auth secretOr run openssl rand -base64 33 and add it to .env.local
- Install dependencies
npm install- Run the development server
npm run dev
- Open http://localhost:3000 <> with your browser to see the result
Next.auth configuration for Next.js
This project is deployed using Vercel and is currently being maintained on our sponsor's Vercel account where deployments and build/runtime logs of the website can be monitored.
Please contact our project's sponsor, Shane Brown @ OSU, for access to this account if you are interested in helping to maintain this project.
Updates to this project's main branch are automatically deployed, and can be viewed under Deployments in the side pane of this repository.
To keep the project up-to-date, we recommend performing regular maintenance tasks such as the following:
- Run
npm outdatedperiodically to check for outdated packages. - Update dependencies with
npm updateand test thoroughly. - Stack Updates:
- Monitor Next.js release notes for breaking changes.
- Track React.js updates for deprecations or new features.
- Subscribe to newsletters (e.g., Mantine, NextAuth) for security patches.
- Ensure automated backups are enabled in AWS RDS.
- Verify backup retention policies.
- Monitor AWS RDS (CPU, memory, storage) via services such as AWS CloudWatch.
- Check S3 bucket storage usage and access logs.
- Rotate AWS keys and
AUTH_SECRETevery 3–6 months. - Review NextAuth.js and Nodemailer configurations for vulnerabilities.
- Clear unused files from S3 buckets.
- Optimize database queries (e.g., add indexes for frequent searches).
- Next.js/React.js:
- Test upgrades in a staging environment before deploying.
- Use
npm install next@latest react@latestto target latest stable versions.
- TypeScript:
- Review TS release notes for type-checking improvements.
- Breaking Changes:
- Check
npm auditfor vulnerabilities after upgrades. - Refer to Next.js migration guides for version-specific steps.
- Check
Common errors we've encountered:
Symptoms:
- "DB timeout" or "ECONNREFUSED" errors
- "Too many connections" errors
Solutions:
-
Basic Checks:
- Verify
.env.localRDS credentials (ensure no typos). - Confirm AWS RDS instance is running (check AWS Console).
- Ensure security group allows inbound traffic on port
3306.
- Verify
-
Connection Pool Issues:
- If seeing "Too many connections":
- Close all locally running instances of the project and wait a few minutes before relaunching.
- If seeing "Too many connections":
Symptoms:
- Build Errors during deployment.
Solutions:
- Basic Checks:
- Review Vercel’s build logs for any conflicts and make changes accordingly.
Before users can login and use the site, they first have to sign up and get authenticated by our team.
Once approved or rejected, the user will get an email informing them and the user will be able to login and use the site if approved.
Users that want to contribute to site will need to submit a form with the necessary details of the resources they want to add.
Our team will check and verify the information and will add once approved.
NOTE
This feature will be implemented soon. Users that want to contribute now can send an email to our team in the meantime.
The CONTRIBUTING.md file contains technical information about the project.