WhisperFeed is a secure, anonymous social media platform built with Python and FastAPI. It allows users to share thoughts, posts, and messages while maintaining complete anonymity.
- Anonymous Posting: Share your thoughts without revealing your identity
- Secure Authentication: JWT-based authentication with password hashing
- Real-time Messaging: Private conversations between users
- Voting System: Upvote/downvote posts and comments
- Modern API: Built with FastAPI for high performance and automatic documentation
- Async Database: Uses PostgreSQL with SQLAlchemy for efficient data handling
- Backend: Python 3.11+
- Framework: FastAPI
- Database: PostgreSQL with SQLAlchemy ORM
- Authentication: JWT with PassLib
- Async Support: Built with async/await for better performance
- Data Validation: Pydantic models for request/response validation
-
Clone the repository:
git clone https://github.com/Sam06002/WhisperPython.git cd WhisperPython
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: .\venv\Scripts\activate
-
Install dependencies:
pip install -e .
-
Set up environment variables: Create a
.env
file in the project root with:DATABASE_URL=postgresql+asyncpg://user:password@localhost/anon_db SECRET_KEY=your-secret-key-here
-
Run database migrations:
alembic upgrade head
-
Start the development server:
uvicorn app.main:app --reload
Once the server is running, you can access:
- API Documentation: http://localhost:8000/docs
- Alternative Docs: http://localhost:8000/redoc
POST /api/v1/auth/register
- Register a new userPOST /api/v1/auth/login
- Login and get access tokenGET /api/v1/auth/me
- Get current user infoGET /api/v1/posts
- Get all postsPOST /api/v1/posts
- Create a new postPOST /api/v1/comments
- Add a comment to a postPOST /api/v1/vote
- Vote on a post or comment
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with β€οΈ using FastAPI and Python
- Special thanks to all contributors