Skip to content

A modern, feature-rich class notes application built with React 19, Vite, TailwindCSS v4, and DaisyUI. This project serves as a comprehensive learning platform for mastering React development through Test-Driven Development (TDD).

Notifications You must be signed in to change notification settings

dbc2201/class-notes

Repository files navigation

πŸ“ Class Notes App

A modern, feature-rich class notes application built with React 19, Vite, TailwindCSS v4, and DaisyUI. This project serves as a comprehensive learning platform for mastering React development through Test-Driven Development (TDD).

React Vite TailwindCSS TypeScript

πŸ“š Table of Contents

🎯 Overview

Class Notes App is a comprehensive note-taking application designed for students to create, organize, and manage their class notes efficiently. The application emphasizes learning React 19 fundamentals through hands-on development using Test-Driven Development (TDD) methodology.


Key Highlights

  • πŸ“± Responsive design with TailwindCSS v4 and DaisyUI
  • 🎨 Theme switching capability (light/dark modes)
  • πŸ“ Rich text editing with Quill WYSIWYG editor
  • 🏷️ Tag-based organization system
  • πŸ” Powerful search functionality
  • πŸ’Ύ Local storage persistence (backend API integration planned)
  • πŸ” Simple authentication system
  • βœ… Built using TDD with Jest/Vitest and React Testing Library

πŸŽ“ Learning Objectives

Phase 1: Foundations

  • Understanding React's component-based architecture (CBA)
  • State management with hooks (useState, useEffect, useReducer)
  • Props and component composition
  • Event handling and forms
  • TailwindCSS v4 utility-first styling
  • DaisyUI component integration

Phase 2: Intermediate Concepts

  • Custom hooks creation
  • Context API for global state
  • Local storage integration
  • Form validation and error handling
  • Conditional rendering patterns
  • Component lifecycle understanding

Phase 3: Advanced Patterns

  • Test-Driven Development (TDD) workflow
  • Component testing with Jest/Vitest
  • React Testing Library best practices
  • Performance optimization techniques
  • Code organization and architecture
  • Git collaboration workflows

✨ Features

Core Features (MVP)

  • βœ… User Authentication: Simple email/password login with local storage
  • βœ… CRUD Operations: Create, Read, Update, Delete notes
  • βœ… Rich Text Editor: Quill-based WYSIWYG editor for note content
  • βœ… Tag Management: Create and assign tags to organize notes
  • βœ… Search Functionality: Search notes by title, content, or tags
  • βœ… Theme Switching: Toggle between light and dark themes
  • βœ… Responsive Design: Mobile-first, works on all devices
  • βœ… Local Persistence: All data stored in browser's local storage

Future Enhancements

  • πŸ”„ Backend API integration
  • πŸ“€ Export notes (PDF, Markdown)
  • πŸ“Ž File attachments
  • πŸ”— Note sharing between users
  • πŸ“Š Analytics and statistics
  • πŸ—‚οΈ Folders/Categories
  • ⭐ Favorite/Pin notes

πŸ› οΈ Tech Stack

Core Technologies

  • React 19: UI library with the latest improvements
  • Vite: Next-generation frontend build tool
  • TypeScript: Type-safe JavaScript
  • TailwindCSS v4: Utility-first CSS framework
  • DaisyUI: TailwindCSS component library

Key Libraries

  • Quill: Rich text WYSIWYG editor
  • React Router v7: Client-side routing
  • date-fns: Modern date utility library

Development Tools

  • Jest: Testing framework (initial phase)
  • Vitest: Vite-native testing framework (migration phase)
  • React Testing Library: React component testing
  • ESLint: Code linting
  • Prettier: Code formatting
  • Git: Version control

πŸš€ Getting Started

Prerequisites

  • Node.js (v22 or higher)
  • npm or yarn or pnpm
  • Git
  • Code editor (WebStorm recommended)

Installation

  1. Clone the repository

    git clone https://github.com/dbc2201/class-notes.git
    cd class-notes
  2. Install dependencies

    npm install
  3. Start development server

    npm run dev
  4. Open in browser

    http://localhost:5173
    

Available Scripts

  npm run dev              # Start dev server
  npm run build            # Build for production
  npm run preview          # Preview production build
  npm run lint             # Run ESLint

πŸ”„ Development Workflow

TDD (Test-Driven Development) Cycle

This project follows the Red-Green-Refactor cycle:

1. πŸ”΄ RED: Write a failing test
   ↓
2. 🟒 GREEN: Write minimal code to pass the test
   ↓
3. πŸ”΅ REFACTOR: Improve code quality
   ↓
4. ♻️ REPEAT

Step-by-Step Workflow

Step 1: Understand the Component

  • Read the component specification
  • Review component hierarchy and props
  • Understand expected behavior and edge cases

Step 2: Write Tests First

# Create test file
touch src/__tests__/components/ui/Button.test.tsx

Example test structure:

import { render, screen, fireEvent } from '@testing-library/react';
import { Button } from '@/components/ui/Button';

describe('Button Component', () => {
  it('should render with text', () => {
    render(<Button>Click me</Button>);
    expect(screen.getByText('Click me')).toBeInTheDocument();
  });

  it('should handle click events', () => {
    const handleClick = jest.fn();
    render(<Button onClick={handleClick}>Click me</Button>);
    
    fireEvent.click(screen.getByText('Click me'));
    expect(handleClick).toHaveBeenCalledTimes(1);
  });

  it('should be disabled when disabled prop is true', () => {
    render(<Button disabled>Click me</Button>);
    expect(screen.getByRole('button')).toBeDisabled();
  });
});

Step 3: Run Tests (Red Phase)

npm run test
# Tests should FAIL - this is expected!

Step 4: Implement Component (Green Phase)

// src/components/ui/Button/Button.tsx
import { ButtonHTMLAttributes, FC } from 'react';

interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
  variant?: 'primary' | 'secondary' | 'ghost';
  size?: 'sm' | 'md' | 'lg';
}

export const Button: FC<ButtonProps> = ({
  label,
  variant = 'primary',
  size = 'md',
  className = '',
  ...props
}) => {
  return (
    <button
      className={`btn btn-${variant} btn-${size} ${className}`}
      {...props}
    >
      {label}
    </button>
  );
};

Step 5: Run Tests Again (Green Phase)

npm run test
# Tests should PASS now!

Step 6: Refactor

  • Improve code quality
  • Extract reusable logic
  • Add comments if needed
  • Ensure tests still pass

Step 7: Commit Your Work

git add .
git commit -m "feat(ui): implement Button component with tests"
git push origin feature/button-component

Step 8: Create a Pull Request

  • Follow the PR template
  • Request code review
  • Address feedback
  • Merge when approved

🀝 Contributing

We welcome contributions from students and developers! Here's how you can contribute:

For Students

  1. Pick a component from the milestones/issues list
  2. Create a feature branch following naming conventions
  3. Write tests first (TDD approach)
  4. Implement the component
  5. Ensure tests pass
  6. Commit with conventional commits
  7. Create a pull request
  8. Request code review
  9. Address feedback
  10. Celebrate when merged! πŸŽ‰

For External Contributors

Thank you for your interest in contributing! Please follow these guidelines:

Getting Started

  1. Fork the repository
  2. Clone your fork
    git clone https://github.com/YOUR_USERNAME/class-notes-app.git
  3. Add upstream remote
    git remote add upstream https://github.com/dbc2201/class-notes.git
  4. Create a feature branch
    git checkout -b feature/your-feature-name

Making Changes

  1. Follow the existing code style
  2. Write tests for new features
  3. Ensure all tests pass
    npm run test
    npm run lint
  4. Update documentation if needed
  5. Commit with conventional commits

Submitting Changes

  1. Push to your fork
    git push origin feature/your-feature-name
  2. Create a pull request from your fork to the main repository
  3. Fill out the PR template
  4. Wait for code review
  5. Address review comments
  6. Celebrate when merged! πŸŽ‰

What We're Looking For

  • πŸ› Bug fixes
  • πŸ“ Documentation improvements
  • ✨ New features (please discuss in issues first)
  • β™Ώ Accessibility improvements
  • 🎨 UI/UX enhancements
  • ⚑ Performance optimizations
  • βœ… Additional tests

Code of Conduct

  • Be respectful and constructive
  • Help others learn
  • Focus on the code, not the person
  • Assume good intentions
  • Be patient with beginners

πŸ“„ License

This project is created for educational purposes. Feel free to use it for learning and teaching.


πŸ“ž Support

For Students

  • Create an issue in the repository
  • Ask questions in pull request comments
  • Schedule a review session with the instructor

For External Contributors

  • Check existing issues before creating new ones
  • Read the contributing guide thoroughly
  • Join discussions on issues and PRs
  • Be patient and respectful

πŸ‘₯ Team

Students

Instructor

  • Divyansh Bhardwaj (dbc2201) - Project Guide & Mentor

πŸ™ Acknowledgments

  • React Team for React 19
  • Vite Team for the amazing build tool
  • TailwindCSS Team for the utility-first framework
  • DaisyUI Team for beautiful components
  • Quill Team for the rich text editor
  • All contributors and supporters

πŸ“š Learning Resources

React 19

Testing

TailwindCSS & DaisyUI

TypeScript

Git & GitHub

Best Practices


πŸŽ“ Educational Philosophy

This project is designed with the following educational principles:

1. Learn by Doing

  • Hands-on coding from day one
  • Build real, functional features
  • Immediate feedback through testing

2. Test-Driven Development

  • Write tests first, code second
  • Build confidence through comprehensive testing
  • Learn to think about edge cases early

3. Progressive Complexity

  • Start simple, increase complexity gradually
  • Build on previous knowledge
  • Clear milestones and goals

4. Collaborative Learning

  • Pair programming on complex features
  • Code reviews for knowledge sharing
  • Learn from each other's approaches

5. Professional Practices

  • Real-world Git workflows
  • Industry-standard tools and patterns
  • Documentation and communication skills

6. Foundation for Growth

  • Architecture designed for future enhancements
  • Easy transition to backend integration
  • Scalable patterns and practices

πŸ† Final Thoughts

This project is more than just building a notes app. It's about:

  • 🧠 Learning how to think like a developer
  • πŸ› οΈ Building real-world, professional-quality software
  • 🀝 Collaborating effectively in a team
  • πŸ“š Understanding best practices and patterns
  • 🎯 Achieving tangible, portfolio-worthy results
  • πŸ’ͺ Growing your confidence as a React developer

Remember: Everyone was a beginner once. Embrace the challenge, learn from mistakes, help each other, and most importantly - enjoy the journey!

Happy Coding! πŸš€


About

A modern, feature-rich class notes application built with React 19, Vite, TailwindCSS v4, and DaisyUI. This project serves as a comprehensive learning platform for mastering React development through Test-Driven Development (TDD).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •