This is the official platform for the Studio for Interrelated Media (SIM) program at MassArt. It serves as a digital directory, a collaborative calendar for Thursday class meetings, and an academic record-keeping system for faculty to track student progress.
Follow these steps to get your local environment running:
Ensure you have the following installed:
- Node.js 20+
- npm (The project uses
package-lock.json) - PostgreSQL 14+
# Clone the repository
git clone https://github.com/aefader00/sim-next-app.git
cd sim-next-app
# Install dependencies
npm installTo configure your .env and database quickly, run the interactive setup script:
npm run setupWhat does setup.ts do?
- Creates your
.envfile from the template.env.example - Generates a unique
NEXTAUTH_SECRETautomatically. - Prompts for Google OAuth credentials and tests your PostgreSQL connection.
- Automatically synchronizes the database schema and seeds your first admin user and semester.
npm run devAccess the app at http://localhost:3000.
The codebase follows modern Next.js patterns, separating concerns between data mutation, UI components, and routing.
actions/: Contains Next.js Server Actions for all database mutations. This is where business logic for creating users, updating semesters, and managing "Thursdays" lives.app/: The pages of the websiteadmin/: Restricted tools for faculty management.thursdays/: The central calendar system.users/: Student/Faculty directory.
components/: The user interface elements that make up the pages.domain/: Components tied to specific data types (e.g., a "User Card").forms/: Complex input logic handled withreact-hook-formandzod.ui/: Design system primitives (built on top ofAnt Design).
hooks/: Shared client-side behavior, such asuseURLFilterfor real-time dashboard filtering.setup.ts: A dedicated utility to bridge the gap between a fresh clone and a working development environment.
- Prisma: Used as the ORM. The schema is defined in
database/schema.prisma. - Seeding:
database/seed.tsprogrammatically generates the "Thursday" schedule based on your semester start/end dates, ensuring you don't have to manually create 15+ calendar entries every term.
For production environments (e.g., Ubuntu 24+ with Nginx):
# Update and build
git pull
npm install
npx prisma migrate deploy
npm run build
# Restart the service
pm2 restart massartsimThe application uses PM2 for process management.
- Check Status:
pm2 list - View Logs:
pm2 logs massartsim --lines 50 - Environment Updates:
pm2 restart massartsim --update-env
Always back up the database before manual edits or migrations:
pg_dump -U sim sim > backup_$(date +%Y%m%d).sql- Authentication: Users log in via Google. Security is handled via whitelisting. An admin must add a user's email to the system before they can log in.
- Profiles: Every user requires a name, pronouns, and a face photo for the directory.
- Create a Semester: Set the name (e.g., "FA26") and the date range.
- Automated Generation: The system automatically calculates every Thursday in that range.
- Production Days:
- Big Production Day: Defaults to a "Pozen Center" location.
- Small Production Day: Standard classroom presentations.
- Student Progress: The Admin Dashboard automatically tallies "Works Made" and "Groups Produced" for every student in a given semester, simplifying end-of-term grading.
For technical issues, contact the system administrator or refer to the setup.ts logic.