This project allows users to upload or paste chat transcripts (in .txt or .json format), parse them, preview the messages, and save them to Firebase Firestore.
/client → Next.js frontend
/server → Flask backend
/server/tests → Python scripts to test API routes
/server/firebase → Firebase service credentials
- Place your
serviceAccountKey.jsoninfirebase/ - Ensure Firestore API is enabled for your project.
cd server
python -m venv venv
venv\Scripts\activate # or source venv/bin/activate
pip install -r requirements.txt
python main.pyFlask runs on http://localhost:5000.
cd client
pnpm install
pnpm devNext.js runs on http://localhost:3000.
API proxy is handled in next.config.js to forward /api to Flask.
- Upload
.txtor.jsonchat files - Paste raw text messages
- Live preview parsed messages
- Validation for formatting and file types
- Persists chat to Firestore with UUID
cd server
python tests/test_upload_api.pyTests:
test_upload_text()– Submits raw pasted chattest_upload_file()– Submits sample.txtfile
- Firestore structure follows our defined schema (chat → messages → individual docs).
- Make sure Firebase credentials are not committed to version control.
- Add message timestamp handling
- Add user/session auth
- Build dashboard to view uploaded chats