Skip to content

MaksOther/todo-app

Repository files navigation

React Todo App with API

A full-stack Todo application with user authentication, built with React + TypeScript on the frontend and a custom Node.js REST API backed by PostgreSQL.

🔗 Demo

Live Demo


🛠 Tech Stack

Frontend

  • React — component-based UI
  • TypeScript — static typing
  • SCSS — component styles
  • Vite — build tool and dev server

Backend

  • Node.js — custom REST API
  • PostgreSQL — relational database
  • bcrypt — password hashing
  • JWT — token-based authentication

Tooling

  • Cypress — end-to-end testing
  • ESLint + Prettier + Stylelint — code quality and formatting

✨ Features

  • ✅ Create, read, update and delete todos
  • ✅ Toggle individual todo completion status
  • ✅ Toggle all todos at once with toggleAll
  • ✅ Rename todos via double-click inline editing
  • ✅ Filter todos by status: All / Active / Completed
  • ✅ User registration and login with JWT
  • ✅ Passwords hashed with bcrypt
  • ✅ Loading overlays during API requests
  • ✅ Error notifications for failed API calls

📁 Project Structure

react_todo-app-with-api/
├── src/
│   ├── api/          # API request functions
│   ├── components/   # React components
│   ├── context/      # Global state (Context API)
│   ├── hooks/        # Custom hooks
│   ├── types/        # TypeScript interfaces
│   └── utils/        # Helper functions
├── cypress/          # E2E tests
├── public/
├── .env              # Environment variables
├── vite.config.ts
├── tsconfig.json
└── package.json

🚀 Getting Started

Prerequisites

Installation

# Clone the repository
git clone https://github.com/MaksOther/react_todo-app-with-api.git

# Navigate to the project
cd react_todo-app-with-api

# Install dependencies
npm install

Environment Variables

Create a .env file in the root (or update the existing one)

Running the App

# Start the frontend
npm start

# Start the backend (if separate)
npm run server

The app will be available at http://localhost:5173

Running E2E Tests

npm run cypress:open

🔐 Authentication Flow

  1. User registers with email and password
  2. Password is hashed with bcrypt before storing in PostgreSQL
  3. On login, server validates credentials and returns a JWT token
  4. Token is stored on the client and sent with each API request
  5. Protected routes require a valid token

Releases

No releases published

Packages

 
 
 

Contributors