A simple and modern To-Do List application built using Go for the backend, React for the frontend, and MongoDB for the database.
- Add, update, and delete tasks
- Mark tasks as completed or undo completion
- Real-time task updates
- Responsive design
Block Diagram:
-
Clone the repository:
git clone https://github.com/your-username/go-react-todo.git cd go-react-todo -
Backend Setup:
- Navigate to the
backenddirectory:cd server - Install Go dependencies:
go mod tidy
- Create a
.envfile in thebackenddirectory with the following content:DB_URI=mongodb://localhost:27017 DB_NAME=go_react_todo DB_COLLECTION_NAME=todolist
- Run the backend server:
go run main.go
- Navigate to the
-
Frontend Setup:
- Navigate to the
frontenddirectory:cd client - Install React dependencies:
npm install
- Start the React development server:
npm start
- Navigate to the
-
Access the Application:
- Open your browser and navigate to
http://localhost:3000.
- Open your browser and navigate to
- Add a Task: Type a task in the input field and click "Create Task" to add it to the list.
- Mark as Done: Click the green checkmark to mark a task as completed.
- Undo a Task: Click the blue undo icon to mark a task as incomplete.
- Delete a Task: Click the red delete icon to remove a task from the list.
GET /api/tasks- Retrieve all tasksPOST /api/tasks- Create a new taskPUT /api/tasks/{id}- Mark a task as completedPUT /api/undoTask/{id}- Undo a task completionDELETE /api/deleteTask/{id}- Delete a task
- Go: Backend API
- React: Frontend UI
- MongoDB: Database
- Semantic UI: UI components and styling
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature-branch) - Commit your changes (
git commit -m 'Add some feature') - Push to the branch (
git push origin feature-branch) - Open a Pull Request

