A robust Flutter task management app with full offline-first support, backed by a Node.js/Express and PostgreSQL server.
Seamlessly manage your tasks, even without an internet connection—your data syncs automatically when you're back online.
- User Authentication: Sign up, log in, and secure your data.
- Task Management: Add, view, and delete tasks.
- Offline-First:
- View and create tasks offline.
- Local database (SQLite) for instant access and reliability.
- Unsynced tasks are stored and automatically synced when online.
- Color Picker: Assign colors to tasks for better organization.
- Modern UI: Responsive, clean, and user-friendly interface.
- RESTful API for authentication and task management.
- JWT Authentication for secure endpoints.
- PostgreSQL for persistent, scalable data storage.
- Dockerized for easy deployment and local development.
- Task Sync API for reconciling offline changes.
task_offline_first/
├── lib/ # Flutter app source
│ ├── features/
│ │ ├── auth/ # Authentication logic & UI
│ │ └── home/ # Task management logic & UI
│ └── core/ # Core utilities, constants, services
├── server/ # Node.js backend
│ ├── src/ # Express routes, middleware, db schema
│ ├── Dockerfile # Docker config for backend
│ └── docker-compose.yml # Multi-service orchestration
├── assets/ # Fonts and other assets
├── pubspec.yaml # Flutter dependencies
└── README.md # Project documentation
- Flutter SDK
- Node.js
- Docker (for backend, optional)
git clone https://github.com/yourusername/task_offline_first.git
cd task_offline_firstcd task_offline_first
flutter pub get
flutter runcd server
docker-compose up --buildcd server
npm install
npm run devThe backend will be available at http://localhost:8000.
POST /auth/signup— Register a new userPOST /auth/login— Log in and receive JWTPOST /auth/tokenIsValid— Validate JWTGET /auth— Get user info (requires JWT)
GET /task— Get all tasks for the userPOST /task— Create a new taskDELETE /task— Delete a taskPOST /task/sync— Sync unsynced tasks (for offline support)
- Local Storage: Uses SQLite to store tasks and user info.
- Sync Logic: Tasks created offline are marked as unsynced and pushed to the server when a connection is available.
- Instant Feedback: All actions are reflected immediately in the UI, even when offline.
- Flutter: No special setup required for local/offline use.
- Backend: See
server/docker-compose.ymlfor environment variables (e.g.,DATABASE_URL).
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.