ToDo CRUD Application
This is a full-stack ToDo CRUD (Create, Read, Update, Delete) application built using Go, React, and MongoDB, with deployment on Railway.
Deployment
The application is deployed on Railway. You can access the live version here: Live Demo.
Features
- Create a new task
- Read or view tasks
- Update an existing task
- Delete a task
- Light and Dark mode user interface
- Real-time data fetching, caching, and updates using TanStack Query
Tech Stack
- Go: Backend framework
- Vite + React: Frontend
- MongoDB: NoSQL database for storing tasks
- Railway: Deployment platform
Prerequisites
Ensure the following are installed on your system:
Environment Variables
Create a .env
file in the root of your project with the following content:
PORT=4000
ENV=development
MONGODB_URI=your-mongodb-uri
Replace your-mongodb-uri
with your actual MongoDB connection string.
Installation
- Clone the repository:
git clone https://github.com/AdityasWorks/ToDo-CRUD-application.git
- Navigate to the project directory:
cd todo-crud-application
- Install backend dependencies:
go mod tidy
- Install frontend dependencies:
cd client
npm install
Running the Application
- Start the backend server (ensure you are in the main
todo-crud-application
folder):
air
This uses Air for live-reloading in Go. If you don’t have Air installed, you can install it with:
go install github.com/cosmtrek/air@latest
Alternatively, you can start the backend server without Air:
go run main.go
- Start the frontend server:
cd client
npm run dev
- Visit the application at
http://localhost:PORT
.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Acknowledgements