Skip to content

devwithgroot/SENTRY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HackSky Chat Upload API

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.

Project Structure


/client       → Next.js frontend
/server       → Flask backend
/server/tests        → Python scripts to test API routes
/server/firebase     → Firebase service credentials

Setup

1. Firebase

  • Place your serviceAccountKey.json in firebase/
  • Ensure Firestore API is enabled for your project.

2. Backend (Flask)

cd server
python -m venv venv
venv\Scripts\activate  # or source venv/bin/activate
pip install -r requirements.txt
python main.py

Flask runs on http://localhost:5000.

3. Frontend (Next.js)

cd client
pnpm install
pnpm dev

Next.js runs on http://localhost:3000.

API proxy is handled in next.config.js to forward /api to Flask.


Features

  • Upload .txt or .json chat files
  • Paste raw text messages
  • Live preview parsed messages
  • Validation for formatting and file types
  • Persists chat to Firestore with UUID

Running Tests

cd server
python tests/test_upload_api.py

Tests:

  • test_upload_text() – Submits raw pasted chat
  • test_upload_file() – Submits sample .txt file

Notes

  • Firestore structure follows our defined schema (chat → messages → individual docs).
  • Make sure Firebase credentials are not committed to version control.

Todo

  • Add message timestamp handling
  • Add user/session auth
  • Build dashboard to view uploaded chats

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •