-
Notifications
You must be signed in to change notification settings - Fork 3
Developer Quickstart
Teambuilder is a web-based administrative platform for the EPICS program at UT Dallas. It automates student-to-project team assignments, manages project and partner records, integrates with Discord and GitHub, and provides demographic data visualization.
- Frontend: Vue 3, Nuxt 3, PrimeVue, Tailwind CSS
- Backend: Nuxt server routes (Nitro)
- Database: SQLite via Prisma ORM
- Authentication: Better Auth — magic link login, UTD email restricted
- Email: Gmail SMTP via Nodemailer
- Package Manager: pnpm — do not use npm or yarn
- Deployment: Docker + Docker Compose
There are two roles in the system:
Admin
- Full access to all pages
- Can approve, deny, and remove users from the
/admin/userspage - Can promote/demote other users to admin
User
- Access to all pages except
/admin/users - Must be whitelisted by an admin before they can log in
Before setting up locally, make sure you have:
- Node.js v20+
-
pnpm — install with
npm install -g pnpm - Git
- A
@utdallas.eduemail address
git clone https://github.com/UTDallasEPICS/Teambuilder.git
cd Teambuilder
git checkout stagepnpm installGet the .env file from a current team member — it is not committed to the repo for security reasons. Place it in the root of the project.
The .env file must contain the following variables:
# Database
PRISMA_DB_URL="file:./prisma/dev.db"
DATABASE_URL="file:./prisma/dev.db"
# Discord Bot
TOKEN=
GUILD_ID=
BOT_ID=
# GitHub Integration
GITHUB_TOKEN=
# Authentication (Better Auth)
BETTER_AUTH_SECRET=
BETTER_AUTH_URL="http://localhost:3000"
# Email (Gmail SMTP)
SMTP_HOST="smtp.gmail.com"
SMTP_PORT="465"
SMTP_USER=
SMTP_PASS=
SMTP_FROM=
⚠️ Make surePRISMA_DB_URLusesfile:./prisma/dev.dbfor local development. The Docker/production version usesfile:/app/prisma/dev.db.
⚠️ BETTER_AUTH_URLmust match the URL you are running the app on. For local dev this ishttp://localhost:3000. For the stage server it ishttps://teambuilder-stage.npts.tech.
Run migrations and seed the database:
npx prisma migrate devThis will apply all migrations and run prisma/seed.ts, which creates the initial admin accounts and fake seed data for development.
To verify the database is set up correctly:
npx prisma studioOpen http://localhost:5555 and check that the User table has the seeded admin accounts.
pnpm devThe app will be available at http://localhost:3000.
The app uses magic link login restricted to @utdallas.edu email addresses.
Login flow:
- Go to
http://localhost:3000/login - Enter your
@utdallas.eduemail - Click "Send Magic Link"
- Check your inbox and click the link
- If your account is not yet whitelisted, you will see a "pending approval" screen
- An admin must approve your account at
/admin/usersbefore you can access the app
First time setup: The seed file pre-creates admin accounts for the core team. If your email is not in the seed, ask an admin to approve you after your first login attempt.
⚠️ During local development, magic link emails can only be sent to the email address associated with the Gmail SMTP account in.env. Ask a team member if you need a link sent manually.
Admins can manage users at /admin/users. This page shows:
- Pending — users who have clicked a magic link but have not been approved yet
- Active — whitelisted users with access to the app
- Removed — users who have been denied or removed
From this page admins can approve, deny, remove, restore, promote to admin, or demote from admin.
When you make changes to prisma/schema.prisma, run:
npx prisma migrate dev --name describe_your_changeThis generates a migration file and applies it to your local database. Commit the migration file to the repo — it will be applied to the live database automatically on the next deploy via entrypoint.sh.
To reset your local database completely (wipes all data, reruns migrations and seed):
npx prisma migrate reset
⚠️ Never runprisma migrate reseton the production server.
To run the app locally using Docker:
docker compose up --buildThe app will be available at http://localhost:3000. The SQLite database is persisted in a Docker volume called db_data.
⚠️ When running in Docker,PRISMA_DB_URLmust befile:/app/prisma/dev.db.
The stage site is at https://teambuilder-stage.npts.tech. Deployment is handled by the server team. To deploy new changes:
- Merge your branch into
stage - The server team pulls the latest
stagebranch and restarts the Docker container - On restart,
entrypoint.shautomatically runsprisma migrate deployandprisma db seed
├── pages/ # Nuxt pages (frontend routes)
│ ├── login.vue # Login page
│ ├── admin/
│ │ └── users.vue # Admin user management
│ └── ...
├── server/
│ ├── api/ # Backend API routes
│ ├── middleware/ # Server middleware (auth, Prisma client)
│ ├── lib/
│ │ └── auth.ts # Better Auth configuration
│ └── integrations/ # Discord and GitHub bots
├── middleware/
│ └── auth.global.ts # Frontend route guard
├── composables/
│ └── useAuthState.ts # Auth state management
├── prisma/
│ ├── schema.prisma # Database schema
│ ├── seed.ts # Database seed file
│ └── migrations/ # Migration history
├── components/ # Reusable Vue components
├── algorithms/ # Team generation algorithms
└── docker-compose.yml # Docker configuration
- The Discord bot may fail to connect with a 503 error during Discord outages — this is expected and does not affect the rest of the app
- Magic link emails during local development only deliver to the Gmail account owner's email due to SMTP restrictions
Wiki
Website Functionality
Demographics Workflows
Project Plans
- [S25] Team Formation Plan
- [S25] Demographics Plan
- [F24] Team Formation Plan
- [F24] GitHub/Discord Plan
- [F24] Demographics Plan
Resources