Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Todo Application

A full-stack Todo application built with React, Node.js, Express, and PostgreSQL. This project demonstrates a modern web application with a clean, responsive UI and RESTful API architecture.

Features

  • ✨ Create, read, and delete todos
  • 🎨 Modern, responsive UI design
  • 🔄 Real-time updates
  • 🎯 RESTful API architecture
  • 💾 PostgreSQL database integration
  • 🛡️ Error handling and validation

Tech Stack

Frontend

  • React.js
  • Vite
  • CSS3 with modern styling
  • Fetch API for HTTP requests

Backend

  • Node.js
  • Express.js
  • PostgreSQL
  • pg (PostgreSQL client for Node.js)

Prerequisites

Before running this project, make sure you have the following installed:

  • Node.js (v14 or higher)
  • PostgreSQL
  • npm or yarn

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/todo-app.git
cd todo-app
  1. Install backend dependencies:
cd backend
npm install
  1. Install frontend dependencies:
cd ../frontend
npm install
  1. Set up the database:
CREATE DATABASE servertest;
  1. Create the required table:
CREATE TABLE todo(
    todo_id SERIAL PRIMARY KEY,
    description VARCHAR(255)
);
  1. Create a .env file in the backend directory with the following variables: DB_USER=your_postgres_username DB_HOST=localhost DB_NAME=servertest DB_PASSWORD=your_postgres_password DB_PORT=5432

Running the Application

  1. Start the backend server:
cd backend
npm start
  1. Start the frontend development server:
cd frontend
npm run dev
  1. Open your browser and navigate to http://localhost:5173

API Endpoints

The backend provides the following RESTful API endpoints:

  • GET /todos - Get all todos
  • POST /todos - Create a new todo
  • DELETE /todos/:id - Delete a todo by ID

Features in Detail

Frontend

  • Modern, responsive UI with smooth animations
  • Real-time updates without page refresh
  • Form validation and error handling
  • Clean component architecture

Backend

  • RESTful API design
  • PostgreSQL database integration
  • Error handling middleware
  • CORS enabled for cross-origin requests

About

basic database setup

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages