Skip to content

jamesdunnington/todolist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Advanced Todo List PWA

A modern, full-stack Progressive Web Application (PWA) todo list built with React, TypeScript, Vite, Tailwind CSS, and Neon PostgreSQL. Features complete user authentication, category management, cross-device synchronization, and mobile-optimized responsive design.

๐Ÿš€ Features

  • โœ… Modern Stack: Built with React 19, TypeScript, and Vite
  • ๐ŸŽจ Beautiful UI: Styled with Tailwind CSS with mobile-first responsive design
  • ๐Ÿ“ฑ Progressive Web App: Installable on all devices with offline support
  • ๐Ÿ” User Authentication: Secure login/signup with JWT tokens and database persistence
  • ๐Ÿ—„๏ธ Neon Database: PostgreSQL cloud database for cross-device synchronization
  • ๐Ÿท๏ธ Category Management: Create, edit, and delete custom todo categories
  • ๐Ÿ“Š Priority Levels: Organize todos with Low, Medium, High priority indicators
  • ๐Ÿ“… Due Dates: Set and track due dates with overdue indicators and calendar integration
  • ๐Ÿ” Advanced Filtering: Filter by status, priority, category, due date, and search functionality
  • ๏ฟฝ Offline Support: Service worker caching for offline functionality
  • ๐Ÿ”„ Real-time Sync: Automatic synchronization across devices and browsers
  • ๏ฟฝ Mobile Optimized: Touch-friendly interface with proper viewport handling
  • ๐ŸŽฏ Intuitive UX: Clean, modern interface with smooth animations and micro-interactions

๐Ÿ› ๏ธ Tech Stack

  • Frontend: React 19, TypeScript, Vite
  • Backend: Neon PostgreSQL (Serverless)
  • Styling: Tailwind CSS
  • Icons: Heroicons
  • Forms: React Hook Form with Zod validation
  • Authentication: Custom JWT implementation with secure token handling
  • PWA: Vite PWA plugin with Workbox service worker
  • Storage: Neon Database + localStorage fallback
  • Deployment: Netlify with automatic builds
  • CI/CD: Netlify Build with environment variables

๐Ÿ“ฆ Installation

  1. Clone the repository:
git clone <your-repo-url>
cd todolist
  1. Install dependencies:
npm install
  1. Create environment file:
cp .env.example .env
  1. Start the development server:
npm run dev

๐Ÿš€ Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build
  • npm run lint - Run ESLint

๐ŸŒ Live Demo

๐Ÿ”— Live Application: https://legendary-pithivier-da3424.netlify.app

๐Ÿš€ Deployment to Netlify

This project is configured with netlify.toml for automatic deployments.

Automatic Deployment

  1. Push your code to GitHub
  2. Connect your repository to Netlify
  3. Netlify will automatically:
    • Install dependencies
    • Build the project
    • Deploy to production
    • Set up PWA features

Environment Variables

The following environment variables are configured in Netlify:

VITE_DATABASE_URL=postgresql://[user]:[password]@[host]/[database]
VITE_JWT_SECRET=your-secure-jwt-secret-key-here
VITE_APP_NAME=Advanced Todo List

โš ๏ธ Security Note: Never commit actual secrets to your repository. Use strong, unique secrets for production.

Manual Deployment

# Build and deploy
npm run build
netlify deploy --prod --dir=dist

๐Ÿ—‚๏ธ Project Structure

src/
โ”œโ”€โ”€ components/          # Reusable UI components
โ”‚   โ”œโ”€โ”€ CategoryManager.tsx  # Category CRUD management
โ”‚   โ”œโ”€โ”€ Header.tsx          # Main navigation header
โ”‚   โ”œโ”€โ”€ InstallButton.tsx   # PWA install prompt
โ”‚   โ”œโ”€โ”€ LoginForm.tsx       # User login form
โ”‚   โ”œโ”€โ”€ SignupForm.tsx      # User registration form
โ”‚   โ”œโ”€โ”€ TodoFilters.tsx     # Advanced filtering system
โ”‚   โ”œโ”€โ”€ TodoForm.tsx        # Add/edit todo modal
โ”‚   โ””โ”€โ”€ TodoItem.tsx        # Individual todo item
โ”œโ”€โ”€ contexts/            # React Context providers
โ”‚   โ””โ”€โ”€ AuthContext.tsx     # Authentication state management
โ”œโ”€โ”€ hooks/              # Custom React hooks
โ”‚   โ”œโ”€โ”€ useCategories.ts    # Category management
โ”‚   โ””โ”€โ”€ useTodos.ts         # Todo CRUD operations
โ”œโ”€โ”€ lib/                # Utility functions and services
โ”‚   โ”œโ”€โ”€ auth.ts             # Authentication utilities
โ”‚   โ”œโ”€โ”€ authApi.ts          # Authentication API layer
โ”‚   โ”œโ”€โ”€ authDatabase.ts     # User database operations
โ”‚   โ”œโ”€โ”€ authLocal.ts        # Local authentication fallback
โ”‚   โ”œโ”€โ”€ categoryDatabase.ts # Category database operations
โ”‚   โ”œโ”€โ”€ database.ts         # Neon database client
โ”‚   โ”œโ”€โ”€ todoDatabase.ts     # Todo database operations
โ”‚   โ””โ”€โ”€ utils.ts           # Helper utilities
โ”œโ”€โ”€ pages/              # Page components
โ”‚   โ”œโ”€โ”€ AuthPage.tsx        # Login/signup page
โ”‚   โ””โ”€โ”€ Dashboard.tsx       # Main todo dashboard
โ”œโ”€โ”€ types/              # TypeScript type definitions
โ”‚   โ””โ”€โ”€ index.ts           # App-wide types
โ”œโ”€โ”€ App.tsx             # Root component with routing
โ”œโ”€โ”€ main.tsx           # App entry point with PWA
โ””โ”€โ”€ index.css          # Global styles with mobile optimizations

๐ŸŽฏ Usage

Getting Started

  1. Create Account: Sign up with email and password
  2. Login: Use your credentials to access your todos
  3. Install PWA: Click the install button to add to your home screen

Managing Todos

  1. Add Todo: Click "Add Todo" button to create new tasks
  2. Set Priority: Choose Low, Medium, or High priority levels
  3. Assign Category: Select or create custom categories
  4. Set Due Date: Add deadlines with calendar picker
  5. Edit Todo: Click edit icon to modify existing todos
  6. Complete Todo: Check the box to mark as completed
  7. Delete Todo: Use trash icon to permanently remove

Organization & Filtering

  1. Search: Use search bar for title/description lookup
  2. Filter by Status: All, Active, or Completed todos
  3. Filter by Priority: Filter by Low, Medium, High priority
  4. Filter by Category: Show todos from specific categories
  5. Filter by Due Date: Today, This Week, Overdue options
  6. Manage Categories: Create, edit, and delete categories

Synchronization

  • Cross-Device: Login from any device to access your todos
  • Offline Support: App works offline, syncs when reconnected
  • Real-time Updates: Refresh button syncs latest changes

๐Ÿ”ฎ Future Enhancements

  • ๐Ÿ‘ฅ Collaboration and sharing features
  • ๐Ÿ”” Push notifications for due dates
  • ๐ŸŒ™ Dark mode toggle
  • ๐Ÿ“Š Advanced analytics and insights
  • ๐Ÿท๏ธ Tag system beyond categories
  • ๐Ÿ“ฑ Native mobile apps
  • ๐Ÿ”„ Recurring todos
  • ๐Ÿ“Ž File attachments
  • โฐ Time tracking

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๏ฟฝ PWA Features

  • Installable: Add to home screen on any device
  • Offline Support: Works without internet connection
  • Service Worker: Caches app resources for fast loading
  • Responsive: Optimized for desktop, tablet, and mobile
  • App-like Experience: Full-screen mode with native feel

๐Ÿ—ƒ๏ธ Database Schema

Users Table

CREATE TABLE users (
  id TEXT PRIMARY KEY,
  name TEXT NOT NULL,
  email TEXT UNIQUE NOT NULL,
  password_hash TEXT NOT NULL,
  created_at TIMESTAMPTZ DEFAULT NOW()
);

Categories Table

CREATE TABLE categories (
  id TEXT PRIMARY KEY,
  user_id TEXT REFERENCES users(id) ON DELETE CASCADE,
  name TEXT NOT NULL,
  color TEXT DEFAULT '#3B82F6',
  created_at TIMESTAMPTZ DEFAULT NOW()
);

Todos Table

CREATE TABLE todos (
  id TEXT PRIMARY KEY,
  user_id TEXT REFERENCES users(id) ON DELETE CASCADE,
  title TEXT NOT NULL,
  description TEXT,
  completed BOOLEAN DEFAULT false,
  priority TEXT CHECK (priority IN ('low', 'medium', 'high')),
  category TEXT DEFAULT 'General',
  due_date TIMESTAMPTZ,
  created_at TIMESTAMPTZ DEFAULT NOW(),
  updated_at TIMESTAMPTZ DEFAULT NOW()
);

๐Ÿš€ Performance

  • Build Size: ~580KB (gzipped: ~178KB)
  • Lighthouse Score: 95+ Performance, 100 Accessibility
  • Mobile Optimized: Touch-friendly 44px minimum touch targets
  • Fast Loading: Service worker caching and code splitting
  • Database: Neon serverless PostgreSQL with connection pooling

๏ฟฝ๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments


Built with โค๏ธ using React 19, TypeScript, Tailwind CSS, and Neon PostgreSQL

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages