A decentralized, peer-coordinated PDF sharing and storage system โ inspired by Napster.
The Distributed PDF System (DPS) is a full-stack project designed to provide scalable, distributed storage, sharing, and retrieval of PDF documents. It consists of:
- Backend โ NestJS REST API with user and file management
- Frontend โ Next.js web interface for users
- Sharding Node โ Java-based service for file chunking/storage (Coming Soon)
- Reverse Proxy & Monitoring โ NGINX, Prometheus, and Grafana
This system was developed as part of the System & Network Administration course at Innopolis University (S25).
โโโโโโโโโโโโโโ
โ Frontend โ โ Next.js Web UI
โโโโโโโฌโโโโโโโ
โ HTTP
โผ
โโโโโโโโโโโโโโ
โ NGINX โ โ Reverse Proxy (routes requests to Backend, Frontend, Sharding)
โโโโโโโฌโโโโโโโ
โ
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ Backend โ โ Frontend โ โ Sharding Nodeโ โ Java microservices (Coming Soon)
โโโโโโโฌโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ
โผ
File Storage
โ
โผ
โโโโโโโโโโโโโโ
โ Prometheus โ โ Metrics scraping
โโโโโโโฌโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโ
โ Grafana โ โ Visualization Dashboard
โโโโโโโโโโโโโโ
dps/
โโโ backend/ # NestJS backend server
โโโ frontend/ # Next.js frontend client
โโโ sharding/ # Java-based sharding node (Coming Soon)
โโโ watchproxy/ # NGINX config, Prometheus & Grafana
โโโ .github/ # CI/CD workflows
โโโ README.md # โ you're here
Located in: dps/backend
- User authentication via JWT & local strategies
- File & chunk upload, update, delete
- Node registration (for storage nodes)
- Dockerized & container-ready
- Copy
.env.example
to.env
and fill in your environment variables before starting.
cd backend
pnpm install
# Start in dev mode
pnpm run start:dev
# Start in prod
pnpm run start:prod
Visit: http://45.156.22.249/docs โ auto-generated Swagger UI proxied via NGINX
Located in: dps/frontend
- Upload and manage PDF files
- Browse stored documents
- Modern interface using Next.js App Router
- Copy
.env.example
to.env
and configure environment variables.
cd frontend
pnpm install
pnpm dev
Open http://45.156.22.249 for production or http://localhost:3000 in development.
Coming Soon...
The backend implements:
- Local Strategy (username + password)
- JWT Token issuance
- Guards for authenticated routes
See
/auth/
folder in backend for strategy and guards.
Backend:
# Unit tests
pnpm run test
# E2E tests
pnpm run test:e2e
# Coverage
pnpm run test:cov
Frontend:
# If test setup exists:
pnpm run test
Backend, Sharding Node, and Proxy are containerized.
To deploy everything with Docker Compose:
# For backend
cd backend
docker-compose up --build
# For sharding
cd sharding
docker compose up
# For nginx/prometheus/grafana
cd watchproxy
docker-compose up --build
- Prometheus: http://45.156.22.249/prometheus
- Grafana: http://45.156.22.249/grafana
GitHub Actions:
.github/workflows/ci.yml
: Build & test.github/workflows/cd.yml
: Deployment pipeline
- Backend/Frontend: MIT License โ see LICENSE
- Sharding node: BSD โ see LICENSE-BSD
Developed at Innopolis University as part of the S25 System & Network Administration course.