A web application for sharing weekly availability and proposing meetings between users.
- User authentication with NextAuth.js (GitHub OAuth)
- User profiles with unique IDs
- Weekly availability management
- Meeting proposal system
- SQLite database with Prisma ORM
Dependencies are already installed, but if you need to reinstall:
npm installCreate a .env.local file in the root directory:
# Database URL (SQLite for development)
DATABASE_URL="file:./dev.db"
# NextAuth Configuration
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-key-here" # Generate with: openssl rand -base64 32
# GitHub OAuth (for authentication)
GITHUB_ID="your-github-client-id"
GITHUB_SECRET="your-github-client-secret"- Go to GitHub Developer Settings
- Click "New OAuth App"
- Fill in:
- Application name: Freetime (or any name)
- Homepage URL:
http://localhost:3000 - Authorization callback URL:
http://localhost:3000/api/auth/callback/github
- Click "Register application"
- Copy the Client ID and generate a Client Secret
- Add them to your
.env.localfile
openssl rand -base64 32The database schema is already defined. Run migrations:
npx prisma migrate devGenerate Prisma Client (if needed):
npx prisma generatenpm run devOpen http://localhost:3000 in your browser.
- Start the dev server:
npm run dev - Navigate to
http://localhost:3000 - Click "Sign In" or go to
/login - Sign in with your GitHub account
- You'll be redirected and can access protected pages
- Home (
/): Landing page with navigation - Login (
/login): Sign in page - Profile (
/profile): View your user profile (protected) - Availability (
/availability): Manage your weekly availability (protected) - Meetings (
/meetings): Propose and manage meetings (protected)
View your database with Prisma Studio:
npx prisma studioThis opens a GUI at http://localhost:5555 where you can view and edit your data.
freetime/
├── app/
│ ├── api/
│ │ └── auth/
│ │ └── [...nextauth]/route.ts # NextAuth configuration
│ ├── availability/page.tsx # Availability management
│ ├── login/page.tsx # Login page
│ ├── meetings/page.tsx # Meeting proposals
│ ├── profile/page.tsx # User profile
│ └── page.tsx # Home page
├── prisma/
│ ├── schema.prisma # Database schema
│ └── migrations/ # Database migrations
└── .env.local # Environment variables (create this)
The app is scaffolded with basic pages. You can now:
- Build out the availability management UI
- Create forms for proposing meetings
- Add user search/selection for meeting proposals
- Implement meeting status updates (accept/decline)
- Add email notifications
- Style the UI with CSS or a UI library
- Run
npx prisma generateto generate the Prisma Client
- Run
npm install @auth/prisma-adapter
- Check that
GITHUB_IDandGITHUB_SECRETare set in.env.local - Verify
NEXTAUTH_URLmatches your local URL - Ensure
NEXTAUTH_SECRETis set
- Run
npx prisma migrate devto apply migrations - Check that
DATABASE_URLis set correctly in.env.local