Campass is a comprehensive academic planner and scheduling application designed for students. It helps manages class schedules, tasks, exams, and events in a clean, responsive interface.
- Dashboard: Overview of today's schedule, upcoming tasks, and quick stats.
- Timetable: Manage weekly class schedules with period customization.
- Calendar: Visual monthly/weekly view of all academic events.
- Task & Exam Management: Track assignments and exams with status and deadlines.
- Responsive Design: distinct mobile and desktop experiences.
- Frontend: React, Vite, Tailwind CSS, Radix UI
- Backend: Hono, tRPC
- Database: PostgreSQL (Neon), Drizzle ORM
- Authentication: Better Auth
- Language: TypeScript
- Node.js (v20+ recommended)
- pnpm
- PostgreSQL Database (Neon recommended)
-
Clone the repository
-
Install dependencies:
pnpm install
-
Set up environment variables: Create a
.envfile in the root directory and add the following variables:DATABASE_URL="postgresql://user:password@host:port/database" BETTER_AUTH_SECRET="your_random_secret" GOOGLE_CLIENT_ID="your_google_client_id" GOOGLE_CLIENT_SECRET="your_google_client_secret"Google OAuth Setup:
To enable Google authentication, you need to set up OAuth 2.0 credentials in Google Cloud Platform:
a. Go to Google Cloud Console
b. Create a new project or select an existing one
c. Navigate to APIs & Services > Credentials
d. Click Create Credentials > OAuth client ID
e. Configure the OAuth consent screen if you haven't already:
- Select External user type
- Fill in the required app information
- Add authorized domains if needed
f. Create OAuth 2.0 Client ID:
- Application type: Web application
- Name: Your app name (e.g., "Campass")
- Authorized redirect URIs:
http://localhost:3000/api/auth/callback/google(for development)https://your-domain.com/api/auth/callback/google(for production)
g. Copy the Client ID and Client Secret and add them to your
.envfileNote for Production:
- The redirect URI must point to your backend server URL, not the frontend
- Example: If your frontend is at
https://app.example.comand backend is athttps://api.example.com, usehttps://api.example.com/api/auth/callback/google - The application automatically redirects users to the frontend after successful authentication
-
Push database schema:
pnpm run db:push
Start the development server:
pnpm run devThe application will be available at http://localhost:5173 (client) and http://localhost:3000 (server).
pnpm run dev: Start both client and server in development modepnpm run build: Build for productionpnpm run start: Start production serverpnpm run check: Type checkpnpm run test: Run tests