A high-performance, full-stack web application designed for professional text summarization. It combines a stunning modern frontend built with Astro & Tailwind CSS and an asynchronous REST API backend powered by FastAPI and the Groq inference engine (Llama 3.1).
The project features persistent, continuous chat sessions with User Isolation, ensuring each browser maintains its own private history independently.
- Framework: Astro
- Styling: Tailwind CSS (Custom Dark Mode & Premium UI/UX aesthetics)
- State Management: Native DOM Manipulation &
localStoragefor User Isolation - Typography: Space Grotesk & Montserrat via Google Fonts
- Framework: FastAPI (Asynchronous Python)
- AI Integration: Async Groq Python SDK (llama-3.1-8b-instant)
- Database: PostgreSQL, Async SQLAlchemy (ORM)
- Testing: Pytest (with
pytest-asyncioandpytest-mockfor professional async testing) - Data Validation: Pydantic
- Continuous Chat Sessions: Append messages continuously in the same view rather than overwriting past questions.
- User Isolation: The frontend generates a unique
user_idstored inlocalStorage, meaning every recruiter/user visiting the app will have a private, independent history stream. - Shift+Enter Support: Multi-line text inputs that auto-expand, allowing for complex prompt formatting.
Ensure the following dependencies are installed prior to setup:
- Python 3.10+
- Node.js 18+
- Docker Desktop (Optional for DB)
- A valid Groq API Key
- Clone the repository:
git clone https://github.com/jagardev/summarAIzer.git
cd summarAIzer- Configure Environment:
Navigate to the
backenddirectory and create a.envfile:
GROQ_API_KEY=gsk_your_api_key_here
DB_NAME=summaraizer
DB_USER=admin
DB_PASSWORD=your_secure_password
DATABASE_URL=postgresql+asyncpg://${DB_USER}:${DB_PASSWORD}@localhost:5432/${DB_NAME}- Initialize Database (Docker):
cd backend
docker-compose up -d- Install Dependencies and Run:
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload(Windows: .\venv\Scripts\activate)
The API will be available at http://127.0.0.1:8000.
- Install Dependencies:
Open a new terminal and navigate to the
frontenddirectory:
cd frontend
npm install- Run Development Server:
npm run devThe UI will be accessible at http://localhost:4321.
POST /ai/summarize: Expectstext_input,session_id, anduser_id. Queries Groq, persists the data, and returns the summary.GET /ai/history?limit=15&user_id={id}: Fetches all summaries for the specifieduser_idand groups them intelligently bysession_idto reconstruct chat threads.
To execute the asynchronous, isolated Pytest suite:
cd backend
pytest tests/