Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ WORKDIR /app

# Declare build arguments for Next.js public variables
ARG NEXT_PUBLIC_VAPID_PUBLIC_KEY
ARG NEXTAUTH_URL
ARG BETTER_AUTH_URL

# Set environment variables from build args
ENV NEXT_PUBLIC_VAPID_PUBLIC_KEY=$NEXT_PUBLIC_VAPID_PUBLIC_KEY
ENV NEXTAUTH_URL=$NEXTAUTH_URL
ENV BETTER_AUTH_URL=$BETTER_AUTH_URL

# Copy package files
COPY package.json pnpm-lock.yaml ./
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The purpose of this repository is to proved a template for a base starting point for C4G course projects. This template is not mandatory, but it captures the needs of a typical C4G project that uses a website and a database. A team that uses the template for building their project can also use it to meet course reporting requirements. Features include:

- Authentication using google with 2 provided test accounts
- Authentication with email/password and Google (2 test accounts provided)
- CI/CD which will deploy the application and DB to the [c4g.dev](https://c4g.dev) server using your applications sub-domain.
- A user management page for `ADMIN` users. Base roles are `ADMIN` and `STAFF`.
- Project specific deliverable pages to quickly update as we progress through the course. Found by clicking the `Team` link in the footer of the application.
Expand Down Expand Up @@ -100,7 +100,7 @@ This project uses [`next/font`](https://nextjs.org/docs/app/building-your-applic
- [Shadcn](https://ui.shadcn.com/) - UI component library
- [RadixUI](https://www.radix-ui.com/) - UI component library
- [Lucide-React](https://lucide.dev/guide/packages/lucide-react) - UI icons
- [Next-Auth](https://authjs.dev/) - authentication with google
- [Better Auth](https://better-auth.com/) - authentication with email/password and google
- [Ag-Grid](https://www.ag-grid.com/) - grid / table component
- [Resend](https://resend.com) - emails

Expand Down Expand Up @@ -166,6 +166,6 @@ The migration container (`template-migrations`) runs once per deployment and aut
All required environment variables must be set in your `.env` file before deployment. See `example.env` for the complete list. Key variables:

- `DATABASE_*`: PostgreSQL connection settings
- `AUTH_*`: NextAuth configuration
- `AUTH_*` / `BETTER_AUTH_URL`: Better Auth configuration
- `NEXT_PUBLIC_VAPID_PUBLIC_KEY` / `VAPID_PRIVATE_KEY`: Push notification keys
- `RESEND_API_KEY`: Email service configuration
5 changes: 2 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ services:
dockerfile: Dockerfile
args:
- NEXT_PUBLIC_VAPID_PUBLIC_KEY=${NEXT_PUBLIC_VAPID_PUBLIC_KEY}
- NEXTAUTH_URL=${NEXTAUTH_URL:-http://localhost:3000}
- BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:3000}
ports:
- "${APP_PORT-3001:}3000"
environment:
Expand All @@ -52,8 +52,7 @@ services:
- RESEND_API_KEY=${RESEND_API_KEY}
- NEXT_PUBLIC_VAPID_PUBLIC_KEY=${NEXT_PUBLIC_VAPID_PUBLIC_KEY}
- VAPID_PRIVATE_KEY=${VAPID_PRIVATE_KEY}
- NEXTAUTH_URL=${NEXTAUTH_URL:-http://localhost:3000}
- AUTH_TRUST_HOST=${AUTH_TRUST_HOST:-true}
- BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:3000}
command: node server.js
depends_on:
template-db:
Expand Down
6 changes: 3 additions & 3 deletions example.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ DATABASE_HOST=localhost
DATABASE_PORT=5431
# database url used for prisma (combination of the 5 lines above)
DATABASE_URL=postgresql://root:euI3dxzgDt8NaLuaR4QPWIoJjVXeAKqEovTEV8ecKxw=@localhost:5431/template?schema=public
# Nextauth url for authentication
NEXTAUTH_URL=http://localhost:3000
# Auth secret for nextauth
# Base url for better-auth
BETTER_AUTH_URL=http://localhost:3000
# Auth secret for better-auth
# replace this with output from: openssl rand -base64 32
AUTH_SECRET=PxVYHb3UPLDMO/F8IWh1EmDDCWqm9Y+l2meScUjUQog=
# Replace the next two from google cloud console
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"docker:build": "docker compose build"
},
"dependencies": {
"@auth/prisma-adapter": "^2.11.1",
"@prisma/adapter-pg": "^7.3.0",
"@prisma/client": "^7.3.0",
"@radix-ui/react-avatar": "^1.1.1",
Expand All @@ -39,12 +38,12 @@
"@types/web-push": "^3.6.4",
"ag-grid-community": "^35.0.1",
"ag-grid-react": "^35.0.1",
"better-auth": "^1.6.23",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"dotenv": "^17.2.3",
"lucide-react": "^0.464.0",
"next": "16.1.6",
"next-auth": "^5.0.0-beta.30",
"next-themes": "^0.4.4",
"papaparse": "^5.5.3",
"react": "19.2.1",
Expand Down
Loading
Loading