A modern, feature-rich todo application built with Next.js 16, TypeScript, and Tailwind CSS.
Before you begin, ensure you have the following installed on your system:
- Node.js 20.x or higher (Download)
- npm (comes with Node.js) or yarn/ pnpm
- Git (Download)
- VS Code or your preferred IDE (optional but recommended)
node --version # Should be v20.x or higher
npm --version # Should be 10.x or higher
git --version # Should be 2.x or highergit clone https://github.com/your-username/moretodos.git
cd moretodosnpm ciNote: We use
npm ciinstead ofnpm installfor faster, reliable, reproducible builds. This is also what our CI/CD pipeline uses.
npm run devOpen http://localhost:3000 with your browser to see the application.
- Development server starts without errors
- Application loads in browser
- Hot reload works when you edit files
- All tests pass (see Testing section below)
| Script | Description |
|---|---|
npm run dev |
Start development server with hot reload |
npm run build |
Build the application for production |
npm start |
Start production server (run after build) |
npm run lint |
Run ESLint to check code quality |
npm run format |
Format code with Prettier |
npm run format:check |
Check if code is properly formatted |
npm test |
Run unit tests with Jest |
npm run test:watch |
Run tests in watch mode |
npm run e2e:test |
Run Playwright E2E tests |
npm run e2e:test:ui |
Run E2E tests with interactive UI |
npm run e2e:ci |
Run E2E tests in CI mode |
- Start the dev server:
npm run dev - Edit files: The application will automatically reload when you save changes
- Code formatting: Code is automatically formatted on commit via Husky hooks
- Run tests: Use
npm testornpm run test:watchfor unit tests
This project enforces code quality through:
- ESLint: Catches potential errors and enforces coding standards
- Prettier: Automatically formats code for consistency
- Husky: Pre-commit hooks that run formatting and linting
- lint-staged: Only formats staged files for faster commits
We use Jest and React Testing Library for unit testing:
# Run all tests once
npm test
# Run tests in watch mode (recommended for development)
npm run test:watchWe use Playwright for end-to-end testing:
# Run E2E tests
npm run e2e:test
# Run E2E tests with interactive UI
npm run e2e:test:ui
# Run E2E tests in CI mode
npm run e2e:ciOur GitHub Actions automatically run:
- Unit tests on every pull request
- E2E tests on every pull request
- Tests run in parallel for faster feedback
moretodos/
├── src/
│ ├── app/ # Next.js App Router pages
│ ├── components/ # React components
│ ├── lib/ # Utility functions
│ └── types/ # TypeScript type definitions
├── e2e/ # Playwright E2E tests
├── docs/ # Project documentation
├── .github/workflows/ # GitHub Actions CI/CD
└── public/ # Static assets
- Framework: Next.js 16 (App Router)
- Language: TypeScript 5
- UI Library: React 19
- Styling: Tailwind CSS 4
- Testing: Jest, React Testing Library, Playwright
- Code Quality: ESLint, Prettier
- Git Hooks: Husky, lint-staged
- Deployment: Vercel
This project uses automatic deployments via Vercel with automated version bumping and Git tagging.
- Preview Deployments: Every pull request automatically gets a preview deployment URL from Vercel
- Production Deployments: Merging to the
masterbranch triggers a production deployment - Version Bumping: On merge to master, the version is automatically bumped based on PR labels
- Git Tagging: After version bump, a Git tag is created with format
v{version}(e.g.,v1.0.0)
Add one of the following labels to your PR title to control the version bump:
[version:major]- Bumps major version (1.0.0 → 2.0.0)[version:minor]- Bumps minor version (1.0.0 → 1.1.0)[version:patch]- Bumps patch version (1.0.0 → 1.0.1)
Default Behavior: If no label is present, the version is bumped by patch version.
- Create a PR with new features
- Add
[version:minor]to the PR title - Merge the PR to master
- GitHub Actions automatically bumps version (e.g., 1.0.0 → 1.1.0)
- A Git tag
v1.1.0is created - Vercel deploys the new version to production
# Find and kill process using port 3000
lsof -ti:3000 | xargs kill -9
# Or use a different port
npm run dev -- -p 3001# Check your Node version
node --version
# If you need to switch versions, use nvm
nvm install 20
nvm use 20# Install Playwright browsers
npx playwright install
# Install system dependencies (Linux)
npx playwright install-deps# Clear Next.js cache
rm -rf .next
# Clear node_modules and reinstall
rm -rf node_modules package-lock.json
npm ci# Fix auto-fixable ESLint issues
npm run lint -- --fix
# Format all files
npm run formatIf you encounter issues not covered here:
- Check the Next.js documentation
- Review the Playwright documentation
- Check existing GitHub Issues
- Create a new issue with detailed error information
We welcome contributions! Here's how to get started:
git clone https://github.com/your-username/moretodos.git
cd moretodosgit checkout -b feature/your-feature-name- Follow the existing code style (automatically enforced by Prettier)
- Write tests for new functionality
- Update documentation if needed
# Run unit tests
npm test
# Run E2E tests
npm run e2e:test
# Check code formatting
npm run format:checkgit add .
git commit -m "feat: add your feature description"
git push origin feature/your-feature-name- Use descriptive PR titles
- Add version labels if needed:
[version:major],[version:minor], or[version:patch] - Ensure all CI checks pass
- Code is automatically formatted with Prettier
- ESLint enforces coding standards
- Pre-commit hooks ensure code quality
- Follow TypeScript best practices
- Next.js Documentation - Learn about Next.js features and API
- React Documentation - Learn React
- Tailwind CSS Documentation - Learn Tailwind CSS
- Playwright Documentation - Learn Playwright testing