A Go-powered backend service for a Todo application with RESTful API and real-time WebSocket notifications.
This backend service provides a robust API for a Todo application, featuring user authentication, task management, and real-time notifications. It's designed to support both online and offline operations, allowing for seamless synchronization when network connection is restored.
- 🔒 User Authentication: Secure registration and login system with JWT
- ✅ Task Management: Complete CRUD operations for todos
- 🔔 Real-time Notifications: WebSocket support for instant updates
- 🔄 Offline Sync Support: Special API design to handle client offline operations
- Go 1.18+
- PostgreSQL/MySQL (configurable)
- Clone the repository
git clone https://github.com/samniu/todo-backend.git
cd todo-backend- Set up environment variables
Create a .env file:
DB_CONNECTION=postgres://username:password@localhost:5432/todo_db
JWT_SECRET=your_jwt_secret_key
PORT=8080
- Run the server
go run cmd/main.goThe server will start at http://localhost:8080.
This project is licensed under the MIT License.