Project Setup Guide
Welcome to the CSCPDUAMA Community project. Follow this guide to set up the project locally on your machine.
📋 Prerequisites
Ensure you have the following installed on your system:
- Node.js: Version
v18.17.0or higher (v20+ recommended). - pnpm: Version
v8.0.0or higher (npm install -g pnpm). - Git: Installed and configured.
- GitHub Account: Required for local OAuth testing and discussions.
🛠️ Step-by-Step Setup
1. Install Dependencies
Run the following command in the project root:
bashpnpm install
2. Configure Environment Variables
Create a .env.local file in the root directory:
bashcp .env.example .env.local
Open .env.local and configure the following variables:
env# NextAuth / Auth.js Configuration AUTH_SECRET="your-generated-auth-secret" # Run: npx auth secret NEXTAUTH_URL="http://localhost:3000" # GitHub OAuth Application Credentials GITHUB_CLIENT_ID="your-github-client-id" GITHUB_CLIENT_SECRET="your-github-client-secret" # GitHub Discussions Context GITHUB_OWNER="cscpduam-org" GITHUB_REPOSITORY="community" # Personal Access Token (for read-only guest fallback) GITHUB_TOKEN="your-github-personal-access-token"
3. Create a GitHub OAuth App
- Go to your GitHub profile Settings > Developer Settings > OAuth Apps > New OAuth App.
- Application Name:
CSCPDUAMA Community - Homepage URL:
http://localhost:3000 - Authorization callback URL:
http://localhost:3000/api/auth/callback/github - Click Register Application, generate a new client secret, and copy the Client ID & Client Secret to
.env.local.
4. Launch Development Server
bashpnpm dev
Open http://localhost:3000 to view the application.