Skip to content

shanebrownescope/engr-science-teaching-resources

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-SCoPe

A centralized educational platform tailored to professors seeking to access and share resources that facilitate active learning and engagement.

Tech Stack

Run Project Locally

To install the project, follow these steps:

  1. Clone the repository
 git clone [email protected]:shanebrownescope/engr-science-teaching-resources.git 
  1. Create .env.local file 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 secret

Or run openssl rand -base64 33 and add it to .env.local

  1. Install dependencies
npm install
  1. Run the development server
npm run dev
  1. Open http://localhost:3000 <> with your browser to see the result

Next.auth configuration for Next.js

Deployment Procedures

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.

Maintenance Guidelines

To keep the project up-to-date, we recommend performing regular maintenance tasks such as the following:

Dependency Updates

  • Run npm outdated periodically to check for outdated packages.
  • Update dependencies with npm update and test thoroughly.
  • Stack Updates:

Database Backups

  • Ensure automated backups are enabled in AWS RDS.
  • Verify backup retention policies.

AWS Resource Monitoring

  • Monitor AWS RDS (CPU, memory, storage) via services such as AWS CloudWatch.
  • Check S3 bucket storage usage and access logs.

Security Audits

  • Rotate AWS keys and AUTH_SECRET every 3–6 months.
  • Review NextAuth.js and Nodemailer configurations for vulnerabilities.

Performance Optimization

  • Clear unused files from S3 buckets.
  • Optimize database queries (e.g., add indexes for frequent searches).

Technology Upgrade Plan

  1. Next.js/React.js:
    • Test upgrades in a staging environment before deploying.
    • Use npm install next@latest react@latest to target latest stable versions.
  2. TypeScript:
  3. Breaking Changes:

Troubleshooting

Common errors we've encountered:

Database Connection Failures

Symptoms:

  • "DB timeout" or "ECONNREFUSED" errors
  • "Too many connections" errors

Solutions:

  1. Basic Checks:

    • Verify .env.local RDS credentials (ensure no typos).
    • Confirm AWS RDS instance is running (check AWS Console).
    • Ensure security group allows inbound traffic on port 3306.
  2. Connection Pool Issues:

    • If seeing "Too many connections":
      • Close all locally running instances of the project and wait a few minutes before relaunching.

Vercel Deployment Failures

Symptoms:

  • Build Errors during deployment.

Solutions:

  1. Basic Checks:
    • Review Vercel’s build logs for any conflicts and make changes accordingly.

Joining the community

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.

Contributing Information

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.

Future Developers

The CONTRIBUTING.md file contains technical information about the project.

Packages

No packages published

Contributors 12