mirror of
https://github.com/SrIzan10/fireentity-movienights.git
synced 2026-06-06 00:56:52 +00:00
8fdc99f5e51cd2c9f1d74900b6e07aad1b7a5110
FireEntity Movie Nights
(WARNING: VIBECODING EXPERIMENT, MADE WITH GEMINI CLI AND QWEN CLI)
A Next.js application for organizing movie nights with voting and scheduling features.
Features
- User Authentication: Sign in with Slack
- Movie Suggestions: Users can suggest movies for movie nights
- Voting System: Vote for your favorite suggested movies
- Admin Panel: Approve movie suggestions and schedule movies
- Calendar View: See what movies are scheduled for which dates
- Responsive Design: Works on desktop and mobile
Getting Started
Prerequisites
- Node.js 18+
- PostgreSQL database
- Slack app for authentication
Setup
-
Clone the repository
git clone <repository-url> cd fireentity-movienights -
Install dependencies
npm install -
Environment Setup
Copy
.env.exampleto.env.localand fill in your values:cp .env.example .env.local -
Database Setup
# Run migrations npx prisma migrate dev # Generate Prisma client npx prisma generate -
Slack App Configuration
- Go to https://api.slack.com/apps
- Create a new app for your workspace
- Add OAuth redirect URL:
http://localhost:3000/api/auth/callback/slack - Copy Client ID and Secret to your
.env.local
-
Run the development server
npm run dev -
Visit the application
Open http://localhost:3000 in your browser.
Admin Access
To make a user an admin:
- Sign in with the user account
- Manually update the database to set
isAdmin = truefor that user - Or use Prisma Studio:
npx prisma studio
Project Structure
src/
├── app/
│ ├── admin/ # Admin dashboard
│ ├── api/ # API routes
│ ├── suggest/ # Movie suggestion page
│ └── page.tsx # Home page with calendar and voting
├── components/
│ ├── ui/ # Reusable UI components
│ └── MovieCalendar.tsx
├── lib/
│ ├── auth.ts # Authentication configuration
│ └── utils.ts
└── prisma/
└── schema.prisma # Database schema
API Endpoints
GET /api/movies- Get approved moviesPOST /api/movies- Suggest a new moviePOST /api/movies/[id]/vote- Vote for a movieGET /api/admin/movies- Get unapproved movies (admin only)POST /api/admin/movies/[id]/approve- Approve a movie (admin only)GET /api/admin/schedule- Get movie schedulePOST /api/admin/schedule- Schedule a movie (admin only)DELETE /api/admin/schedule- Remove scheduled movie (admin only)
Technologies Used
- Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS
- Backend: Next.js API Routes, Prisma ORM
- Database: PostgreSQL
- Authentication: Better Auth with Slack OAuth
- UI Components: Custom components with Tailwind
- Calendar: React Calendar
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Description
Languages
TypeScript
93.1%
CSS
6.8%
JavaScript
0.1%