# Clone the repository
git clone https://github.com/jawa-dam/GEI-Open-Research-Initiative.git
cd GEI-Open-Research-Initiative
# Install dependencies
npm install
# Copy environment configuration
cp .env.example .env.local
# Enable development authentication (optional)
# Edit .env.local and set:
# ENABLE_DEV_AUTH=true
# NEXT_PUBLIC_DEV_AUTH=true
# AUTH_SECRET=any-random-string-for-dev
# Start development server
npm run dev
Visit http://localhost:3000
When ENABLE_DEV_AUTH=true and NEXT_PUBLIC_DEV_AUTH=true are set in development mode:
/sign-inadmin@dev.local / DevAdmin12345!/sign-upThese flags have no effect in production (NODE_ENV=production). The application checks both the environment variable AND NODE_ENV before enabling development auth.
Configure at least one OAuth provider in .env.local:
GitHub OAuth:
AUTH_GITHUB_ID=your-github-oauth-app-id
AUTH_GITHUB_SECRET=your-github-oauth-app-secret
Google OAuth:
AUTH_GOOGLE_ID=your-google-oauth-client-id
AUTH_GOOGLE_SECRET=your-google-oauth-client-secret
Generate AUTH_SECRET:
openssl rand -base64 32
See Auth.js documentation for full provider configuration.
The current implementation uses an in-memory store for development. For production:
DATABASE_URL to .env.localsrc/lib/db.ts with a real database client (Prisma, Drizzle, etc.)DATABASE_SCHEMA.mdEnsure all required variables are set:
| Variable | Required | Description |
|---|---|---|
AUTH_SECRET |
Yes | Random secret for session encryption |
AUTH_TRUST_HOST |
Yes (production) | Set to true behind reverse proxy |
NEXTAUTH_URL |
Yes | Full URL of the application |
DATABASE_URL |
Yes (production) | Database connection string |
| Auth provider vars | Yes (production) | OAuth client ID and secret |
# Type check
npm run typecheck
# Lint
npm run lint
# Build for production
npm run build
# Start production server
npm start
The application is a standard Next.js app and can be deployed to:
npm startsrc/
├── app/ # Next.js App Router pages
│ ├── api/ # API routes
│ │ ├── auth/ # Auth.js handlers + registration
│ │ ├── apply/ # Application submission
│ │ └── submissions/ # Submission CRUD
│ ├── admin/ # Admin panel (admin only)
│ ├── apply/ # Public application form
│ ├── dashboard/ # Contributor home (authenticated)
│ ├── disciplines/ # Public discipline invitations
│ ├── privacy/ # Privacy notice
│ ├── profile/ # Contributor profile (authenticated)
│ ├── research/ # Public Evidence Room
│ ├── review/ # Reviewer queue (reviewer/admin)
│ ├── sign-in/ # Authentication
│ ├── sign-up/ # Registration
│ └── submissions/ # Submission management (authenticated)
├── components/ # Shared React components
├── lib/ # Server-side libraries
│ ├── auth.ts # Auth.js configuration
│ ├── constants.ts # Shared constants and types
│ ├── db.ts # Database abstraction layer
│ ├── research-entries.ts # Evidence Room seed data
│ ├── types.ts # TypeScript type definitions
│ └── validation.ts # Zod validation schemas
└── middleware.ts # Route protection middleware
/dashboard, /profile, /submissions, /review, /admin paths| Feature | Status | What’s Needed |
|---|---|---|
| Public pages | Working | None — fully functional |
| Application form | Working | None — data stored in-memory (dev) |
| Authentication | Needs config | Auth provider credentials (.env.local) |
| Database persistence | Needs setup | PostgreSQL + ORM integration |
| Email verification | Needs setup | SMTP configuration |
| File uploads | Not implemented | Object storage (S3, etc.) |
| Email notifications | Not implemented | Email service integration |