SharePDF is a full-stack web application that allows users to upload, share, and download books in PDF format. The platform focuses on community sharing while including moderation tools, duplicate detection, and a credit-based system for downloads.
This project is built as a portfolio project to demonstrate modern full-stack development using React, FastAPI, PostgreSQL, and Supabase storage.
- Google Sign-In authentication
- Backend verification of Google ID tokens
- JWT-based session authentication
- Upload PDF books
- Automatic duplicate detection using SHA-256 hash
- Categorization (Programming, Science, Comics, etc.)
- Download books uploaded by other users
- Credit-based download system
-
Users can report books
-
Admins can:
- Remove books
- Ban users
- Review reports
- Users must confirm ownership or public domain status
- Community reporting system
- Moderation tools for administrators
Frontend (React)
|
| Google Sign-In
v
Backend API (FastAPI)
|
| ORM
v
PostgreSQL Database (Supabase)
|
| File Storage
v
Supabase Storage (PDFs)
- React
- Google OAuth
- Fetch API / Axios
- FastAPI
- SQLAlchemy ORM
- JWT Authentication
- PostgreSQL (Supabase)
- Supabase Storage (PDF files )
- Uvicorn (ASGI server)
share-knowledge/
│
├── frontend/ # React application
│
├── backend/
│ ├── api/ # Route handlers
│ ├── models/ # SQLAlchemy models
│ ├── schemas/ # Pydantic schemas
│ ├── services/ # Business logic
│ ├── db/ # Database configuration
│ └── main.py # FastAPI entry point
│ └── requirements.txt
└── README.md
git clone https://github.com/robelnigusse/share-knowledge.git
cd share-knowledgeCreate virtual environment:
cd backend
python -m venv venv
source venv/bin/activateInstall dependencies:
pip install -r requirements.txtRun server:
uvicorn main:app --reloadServer runs at:
http://localhost:8000
cd frontend
npm install
npm run devRuns at:
http://localhost:3000
Create backend/.env file:
DATABASE_URL=postgresql://...
GOOGLE_CLIENT_ID=your_google_client_id
JWT_SECRET=your_secret_key
SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_KEY=your_key
Create frontend/.env file:
VITE_APP_GOOGLE_CLIENT_ID=your_google_client_id
VITE_BACKEND_URL=http://localhost:8000
- Comments & reviews
- Recommendation system
This platform is intended for educational and portfolio purposes. Users are responsible for ensuring that uploaded content complies with copyright laws.
Pull requests and suggestions are welcome.