Imported from javecilla/CineMatch-Real-time-Collaborative-Movie-Discovery-Engine (
notes/AGENTS.md). Install upstream withnpx skills add javecilla/CineMatch-Real-time-Collaborative-Movie-Discovery-Engine --skill notes. Copyright stays with the author.
description: alwaysApply: true
AI Agent Instructions β CineMatch
This document instructs AI agents working on CineMatch: Real-time Collaborative Movie Discovery Engine. Follow these guidelines so your changes fit the project and avoid duplicating existing work.
π Required Reading Before Any Implementation
Before writing or changing code, read these files in order:
notes/APP_FLOW.mdβ Architecture, data flow, Firebase schema, TMDB integration, UI/UX (including dark theme), project structure, and constraints.notes/APP_DEV_PLAN.mdβ Implementation plan with phases, tasks, and deliverables.notes/LOGS_CHANGES.mdβ Log of completed and recent work. Always check this before implementing any feature to avoid duplication.
β οΈ Mandatory Workflow
-
Before implementing a feature:
- Open
notes/LOGS_CHANGES.mdand confirm the feature is not already done or in progress. - If it is, do not implement it again.
- Open
-
After implementing or modifying anything:
- Append an entry to
notes/LOGS_CHANGES.mdwith:- What was done
- Which files were created/updated
- Date (and optional: author/agent)
- Append an entry to
-
When planning work:
- Use
notes/APP_DEV_PLAN.mdto choose tasks and phases. - Mark completed tasks (e.g.
[x]) in the plan if appropriate.
- Use
π― Project Summary
CineMatch is an Android app for collaborative movie discovery. Users swipe through movies, join lobbies with friends, and when everyone swipes βYesβ on the same movie, a match is found.
- API: TMDB (The Movie Database)
- Backend: Firebase Realtime Database
- Auth: Firebase Authentication
- UI: Material Design 3, dark theme
Core flows:
- Auth (Registration, Login) β Home
- Home β Create Lobby / Join Lobby
- Lobby β Room code, member list, Start Swiping
- Swiping β Swipe Yes/No on TMDB movies, real-time votes in Firebase
- Match β All members vote Yes on the same movie β Match screen
π Technical Constraints
| Constraint | Value | Notes |
|---|---|---|
| Language | Java 11 | Do not add Kotlin or convert to Kotlin |
| Build | Gradle (Kotlin DSL) | build.gradle.kts, app/build.gradle.kts |
| Namespace | com.example.finalprojectandroiddev2 |
Use for all Java classes |
| Min SDK | 26 | Android 8.0+ |
| Target SDK | 36 | Latest supported |
| Architecture | MVVM (preferred) or MVP | See notes/APP_FLOW.md |
Dependencies (already present):
- Retrofit 2, Gson, OkHttp
- Firebase Auth, Firebase Realtime Database
- Material, AppCompat, ConstraintLayout
Credentials / config:
- TMDB token and API key: in
local.properties, exposed viaBuildConfig - Firebase Realtime DB URL: in
local.properties,BuildConfig.FB_ROUTE_INSTANCE_URL
π Project Structure
Code lives under:
app/src/main/java/com/example/finalprojectandroiddev2/
βββ ui/ # Activities, Fragments
β βββ auth/
β βββ home/
β βββ lobby/
β βββ swiping/
β βββ match/
βββ data/
β βββ api/ # Retrofit interfaces, API client
β βββ repository/
β βββ model/
βββ viewmodel/
βββ utils/
- Layouts:
app/src/main/res/layout/ - Values:
app/src/main/res/values/(strings, colors, themes) - Manifest:
app/src/main/AndroidManifest.xml
Use the layout and class naming patterns from notes/APP_DEV_PLAN.md (e.g. activity_auth.xml, AuthActivity.java).
π¨ UI/UX Rules
-
Theme: Dark theme only. Use the palette from
notes/APP_FLOW.md:- Background: near-black / charcoal
- Surface / cards: dark slate
- Primary accent: teal / cyan
- Secondary accent: amber / yellow for ratings
- Text: white primary, gray secondary
-
Components: Use Material 3 components (Card, Button, TextInputLayout, etc.).
-
Screens: Follow the screen list in
notes/APP_FLOW.md(Splash, Auth, Home, Lobby, Swiping, Match).
π Course Requirements (IT 308W)
These must be satisfied:
- Activities: Registration, Login, and Main/primary screens.
- Firebase Auth: Create accounts and log in via Firebase.
- Free API: TMDB is used (no OpenWeather or weather APIs).
- Firebase Realtime Database: Required for collaborative features (e.g. lobby, votes).
- Feature quality: The main features must be more substantial than simple βadd to cartβ or βadd to favoritesβ only.
CineMatch satisfies these with: lobby/room system, real-time collaborative swiping, and match detection, all backed by Firebase Realtime Database.
β Do's
- Check
notes/LOGS_CHANGES.mdbefore implementing features. - Update
notes/LOGS_CHANGES.mdafter every meaningful change. - Use the Firebase schema from
notes/APP_FLOW.mdfor lobby, members, votes, and matched movie. - Use TMDB endpoints as documented.
- Keep API keys and tokens in
local.propertiesandBuildConfig; never commit them. - Use Java, Retrofit, Gson, Glide/Picasso for images.
- Keep package structure:
ui,data,model,viewmodel,utils. - Follow the dark theme color palette from
notes/APP_FLOW.md.
β Don'ts
- Do not add Kotlin or convert existing Java to Kotlin.
- Do not implement features that are already recorded as done in
notes/LOGS_CHANGES.md. - Do not hardcode API keys, tokens, or Firebase URLs.
- Do not change the Firebase schema without updating
notes/APP_FLOW.md. - Do not use OpenWeather or weather-related APIs.
- Do not rely solely on βadd to cartβ or βadd to favoritesβ as the main features.
π Quick Reference
| Document | Purpose |
|---|---|
notes/APP_FLOW.md |
Architecture, flows, schema, UI, constraints |
notes/APP_DEV_PLAN.md |
Phases and implementation tasks |
notes/LOGS_CHANGES.md |
Completed and recent work (single source of truth) |
notes/INSTRUCTIONS.txt |
Course instructions |
README.md |
Project overview for humans |
π Summary for Agents
- Read
APP_FLOW.md,APP_DEV_PLAN.md, andLOGS_CHANGES.mdbefore coding. - Always consult
LOGS_CHANGES.mdto avoid duplicating work. - Use Java 11; follow MVVM/MVP and the project structure above.
- Stick to the dark theme and Material 3.
- After any implementation or modification, update
LOGS_CHANGES.md.
This file is the primary instruction set for AI agents working on CineMatch. Keep it updated as project rules change.