WhatsApp Archive Viewer
A beautiful, WhatsApp Web-style archive viewer for reading and searching your exported WhatsApp chats. Self-hosted, private, and shareable with group members.
Features
- WhatsApp Web UI - Familiar interface with message bubbles, avatars, and grouping
- Full-text Search - Search through hundreds of thousands of messages instantly
- Media Support - View images, videos, and other attachments from your exports
- Analytics Dashboard - Visualize chat patterns with heatmaps and charts
- Shareable Links - Generate read-only links to share conversations with others
- Large File Support - Handle exports of any size with chunked uploads
- Multi-format Parsing - Supports various WhatsApp export date formats
Screenshots
Home - Conversation List
Chat View - WhatsApp Web Style
Group Chat with Media
Analytics Dashboard
Quick Start
Prerequisites
- Docker and Docker Compose
- PostgreSQL (or use Docker)
- MinIO (or use Docker)
Using Docker Compose
-
Clone the repository:
git clone https://github.com/sabrieker/whatsapp-archive.git cd whatsapp-archive -
Copy the example environment file:
-
Edit
.envwith your configuration:# Generate a secure secret key SECRET_KEY=$(openssl rand -hex 32)
-
Start the services:
-
Open http://localhost:5173 in your browser
Local Development
All operations use the single start.py script:
# 1. Set up config (choose one): # Option A: Create .env in project root cp .env.example .env # Edit .env with your settings # Option B: Use external config file export WH_ARCH_ENV_FILE=/path/to/your/config.env # 2. Initialize (first time only) python start.py init # 3. Start development servers python start.py dev
Available Commands
| Command | Description |
|---|---|
python start.py init |
First-time setup: install dependencies, create database |
python start.py dev |
Start both backend and frontend |
python start.py backend |
Start backend only (port 8000) |
python start.py frontend |
Start frontend only (port 5173) |
python start.py check |
Verify configuration and dependencies |
python start.py help |
Show detailed help |
Manual Setup (Alternative)
cd backend python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt # Set environment variables (or create .env file in project root) export DATABASE_URL=postgresql+asyncpg://user:pass@localhost:5432/whatsapp_archive export MINIO_ENDPOINT=localhost:9000 export MINIO_ACCESS_KEY=your-access-key export MINIO_SECRET_KEY=your-secret-key # Start the server uvicorn app.main:app --reload --port 8000
Frontend
cd frontend
npm install
npm run devConfiguration
| Variable | Description | Default |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | Required |
MINIO_ENDPOINT |
MinIO server address | localhost:9000 |
MINIO_ACCESS_KEY |
MinIO access key | Required |
MINIO_SECRET_KEY |
MinIO secret key | Required |
MINIO_BUCKET |
Storage bucket name | whatsapp-archive |
MINIO_SECURE |
Use HTTPS for MinIO | false |
SECRET_KEY |
Application secret key | Required |
DEBUG |
Enable debug mode | false |
CORS_ORIGINS |
Allowed CORS origins | http://localhost:5173 |
Usage
Importing Chats
-
Export your WhatsApp chat:
- Open WhatsApp > Chat > More > Export chat
- Choose "Include media" for full archive
- Save the ZIP file
-
Upload in the app:
- Click "Import" on the home page
- Select your ZIP file or text file
- Wait for processing to complete
Viewing Analytics
- Open a conversation
- Click the chart icon in the header
- View activity heatmaps, trends, and participant stats
Sharing
- Open a conversation
- Click the share icon
- Copy the generated link
- Anyone with the link can view (read-only)
Tech Stack
Backend:
- FastAPI (Python 3.11+)
- PostgreSQL with async SQLAlchemy
- MinIO for object storage
- Matplotlib/Seaborn for analytics charts
Frontend:
- React 18 with TypeScript
- Vite for building
- TailwindCSS for styling
- React Query for state management
Project Structure
whatsapp-archive/
├── backend/
│ └── app/
│ ├── api/ # FastAPI routes
│ ├── models/ # SQLAlchemy models
│ ├── schemas/ # Pydantic schemas
│ └── services/ # Business logic
├── frontend/
│ └── src/
│ ├── api/ # API client
│ ├── components/ # React components
│ └── pages/ # Page components
├── docs/ # Documentation
└── docker-compose.yml
API Documentation
When running the backend, API docs are available at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Contributing
Contributions are welcome! Please read our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Roadmap
- Conversation merge/append feature
- Export analytics as PDF
- Dark mode
- Mobile app
- End-to-end encryption for shared links
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- WhatsApp for the chat export feature
- The FastAPI and React communities



