A cross-platform PDF synchronization application that enables seamless file syncing across devices. Built with Flutter for the client and NestJS for the backend.
- User Authentication - Secure registration and login system with JWT tokens
- PDF Synchronization - Real-time sync of PDF files across multiple devices
- Offline Support - Local SQLite database for offline file access
- Cross-Platform - Supports Android, Windows, and other Flutter platforms
- File Management - Upload, download, and manage PDF files efficiently
- Conflict Resolution - Smart handling of file version conflicts
- Framework: Flutter/Dart
- State Management: Provider pattern
- Local Database: SQLite (sqflite)
- HTTP Client: http package
- File Handling: path_provider, file_picker
- Framework: NestJS (Node.js)
- Database: PostgreSQL with Prisma ORM
- Authentication: JWT (JSON Web Tokens)
- File Storage: Local file system
- API: RESTful endpoints
synce/
├── client/ # Flutter mobile/desktop app
│ ├── lib/
│ │ ├── data/ # API client & database
│ │ ├── logic/ # Providers & business logic
│ │ ├── pages/ # UI screens
│ │ └── main.dart # App entry point
│ └── pubspec.yaml
├── server/ # NestJS backend
│ ├── src/
│ │ ├── auth/ # Authentication module
│ │ ├── files/ # File management
│ │ ├── sync/ # Sync logic
│ │ └── prisma/ # Database client
│ └── package.json
└── docker-compose.yml # PostgreSQL container
- Flutter SDK (latest stable version)
- Node.js (v18 or higher)
- Docker (for PostgreSQL)
- Git
-
Navigate to the server directory:
cd server -
Install dependencies:
npm install
-
Start PostgreSQL with Docker:
cd .. docker-compose up -d -
Set up environment variables (create
.envin server directory):DATABASE_URL="postgresql://user:password@localhost:5432/syncdb" JWT_SECRET="your-secret-key-here"
-
Run database migrations:
npx prisma migrate dev
-
Start the server:
npm run start:dev
Server will run on http://localhost:3000
-
Navigate to the client directory:
cd client -
Install dependencies:
flutter pub get
-
Update API endpoint in
lib/data/api_client.dartif needed:static const String baseUrl = 'http://localhost:3000';
-
Run the app:
# For Windows flutter run -d windows # For Android flutter run -d android
- Register: Create a new account using the registration screen
- Login: Sign in with your credentials
- Sync Files: Upload PDFs from your device
- Access Anywhere: Files automatically sync across all your devices
- Offline Access: View previously synced files without internet connection
POST /auth/register- Register new userPOST /auth/login- Login and get JWT token
GET /sync/files- Get all user filesPOST /sync/upload- Upload a new fileGET /sync/download/:id- Download a fileDELETE /sync/files/:id- Delete a filePUT /sync/files/:id- Update file metadata
Server:
cd server
npm run testClient:
cd client
flutter testView database with Prisma Studio:
cd server
npx prisma studio- Fork the repository
- Create a 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
This project is licensed under the MIT License.
For issues and questions, please open an issue on the GitHub repository.