Skip to content

pavlovic-bojan/todo-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

46 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‹ Todo App - Full Stack Application

A complete full-stack Todo application with user authentication, built using modern technologies in a monorepo structure.

πŸ“Š Latest Allure Report: View Online

πŸ—οΈ Project Structure

This is a monorepo containing three packages:

todo-app/
β”œβ”€β”€ backend/          # Express API with Prisma ORM and PostgreSQL
β”œβ”€β”€ frontend/         # Vue 3 frontend application
β”œβ”€β”€ test/             # Enterprise QA Testing Framework
└── package.json      # Root package.json (monorepo config)

✨ Features

Backend

  • βœ… User Authentication (Register, Login, Logout)
  • βœ… Password Reset (Forgot/Reset Password)
  • βœ… Role-based Authorization (Admin/Client)
  • βœ… Todo CRUD operations
  • βœ… JWT Authentication with Refresh Tokens
  • βœ… Swagger API Documentation
  • βœ… Logging with Winston
  • βœ… PostgreSQL Database with Prisma ORM
  • βœ… Security: Helmet, Rate Limiting, CSRF, Input Validation
  • βœ… Comprehensive Unit & Integration Tests

Frontend

  • βœ… Vue 3 with Composition API
  • βœ… User Authentication UI
  • βœ… Todo Management Dashboard
  • βœ… Responsive Design with Bootstrap 5
  • βœ… State Management with Pinia
  • βœ… XSS Protection with DOMPurify
  • βœ… Form Validation
  • βœ… Accessibility (WCAG 2.1 AA)
  • βœ… Unit Tests with Vitest

Testing (Enterprise QA Framework)

  • βœ… 70+ automated tests
  • βœ… UI Testing (Playwright + Page Object Model)
  • βœ… API Testing (JSON Schema Validation)
  • βœ… Database Testing (Direct SQLite)
  • βœ… Contract Testing (Pact.js)
  • βœ… Performance Testing (Artillery)
  • βœ… Allure Reports (Screenshots, Videos, History, Trends)

πŸš€ Quick Start

Prerequisites

  • Node.js v18.0.0 or higher
  • npm v9.0.0 or higher

Installation

1. Install all dependencies:

npm install
cd backend && npm install
cd ../frontend && npm install
cd ../test && npm install

2. Setup Backend:

cd backend
npm run prisma:generate
npm run prisma:migrate

3. Configure Environment:

Create backend/.env:

DATABASE_URL="your-db-url"
JWT_SECRET="your-secret-key-here"
JWT_REFRESH_SECRET="your-refresh-secret-here"
PORT=3000

4. Start Development Servers:

# Terminal 1 - Backend
cd backend
npm run dev

# Terminal 2 - Frontend
cd frontend
npm run dev

5. Access Application:


πŸ§ͺ Testing

Run All Tests

# Backend Tests
cd backend
npm test                 # All tests with coverage
npm run test:unit        # Unit tests only
npm run test:integration # Integration tests only

# Frontend Tests
cd frontend
npm test                 # All tests
npm run test:coverage    # With coverage

# QA Framework (E2E, API, DB, Contract, Performance)
cd test
npm run test:smoke       # Quick smoke tests
npm test                 # All UI tests
npm run test:api         # API tests
npm run test:db          # Database tests
npm run test:performance # Performance tests
# See test/README.md for Allure report generation

πŸ“š Documentation

Main Documentation

Quick Links


πŸ› οΈ Tech Stack

Backend

  • Runtime: Node.js 18+
  • Framework: Express.js
  • Database: SQLite + Prisma ORM
  • Authentication: JWT + bcrypt
  • Validation: express-validator
  • Security: Helmet, Rate Limiting, CSRF
  • API Docs: Swagger
  • Logging: Winston
  • Testing: Jest + Supertest

Frontend

  • Framework: Vue 3 (Composition API)
  • Build Tool: Vite
  • State Management: Pinia
  • Routing: Vue Router
  • UI Framework: Bootstrap 5
  • HTTP Client: Axios
  • Security: DOMPurify (XSS protection)
  • Testing: Vitest + @vue/test-utils

Testing

  • E2E: Playwright
  • API Testing: Axios + Ajv (JSON Schema)
  • DB Testing: better-sqlite3
  • Contract Testing: Pact.js
  • Performance: Artillery
  • Reporting: Allure (with video, screenshots, trends)

πŸ“ Project Structure

todo-app/
β”‚
β”œβ”€β”€ backend/                    # Express Backend API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”‚   β”œβ”€β”€ controllers/    # Request handlers
β”‚   β”‚   β”‚   β”œβ”€β”€ services/       # Business logic
β”‚   β”‚   β”‚   β”œβ”€β”€ middleware/     # Auth, validation, error handling
β”‚   β”‚   β”‚   β”œβ”€β”€ routes/         # API routes
β”‚   β”‚   β”‚   └── validations/    # Input validation
β”‚   β”‚   β”œβ”€β”€ config/             # Configuration files
β”‚   β”‚   └── __tests__/          # Unit & integration tests
β”‚   β”œβ”€β”€ prisma/
β”‚   β”‚   └── schema.prisma       # Database schema
β”‚   └── package.json
β”‚
β”œβ”€β”€ frontend/                   # Vue 3 Frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/         # Vue components
β”‚   β”‚   β”œβ”€β”€ views/              # Page views
β”‚   β”‚   β”œβ”€β”€ composables/        # Composition API hooks
β”‚   β”‚   β”œβ”€β”€ stores/             # Pinia stores
β”‚   β”‚   β”œβ”€β”€ router/             # Vue Router config
β”‚   β”‚   β”œβ”€β”€ services/           # API client
β”‚   β”‚   └── __tests__/          # Unit tests
β”‚   └── package.json
β”‚
β”œβ”€β”€ test/                       # QA Testing Framework
β”‚   β”œβ”€β”€ e2e/                    # UI tests (Playwright)
β”‚   β”œβ”€β”€ page-objects/           # Page Object Model
β”‚   β”œβ”€β”€ api/                    # API tests
β”‚   β”œβ”€β”€ database/               # DB tests
β”‚   β”œβ”€β”€ contract/               # Contract tests (Pact)
β”‚   β”œβ”€β”€ performance/            # Performance tests (Artillery)
β”‚   β”œβ”€β”€ helpers/                # Test utilities
β”‚   β”œβ”€β”€ fixtures/               # Test data
β”‚   └── config/                 # Test configuration
β”‚
└── package.json                # Root monorepo config

🎯 Features Highlights

Security

  • βœ… JWT with refresh tokens (httpOnly cookies)
  • βœ… Password hashing (bcrypt with 12 rounds)
  • βœ… Rate limiting (auth endpoints)
  • βœ… CSRF protection
  • βœ… Input validation & sanitization
  • βœ… XSS protection
  • βœ… Security headers (Helmet)
  • βœ… SQL injection prevention (Prisma)

Best Practices

  • βœ… Monorepo architecture
  • βœ… Environment-based configuration
  • βœ… Comprehensive error handling
  • βœ… Logging (Winston)
  • βœ… API documentation (Swagger)
  • βœ… Code quality (ESLint, Prettier)
  • βœ… 95%+ test coverage
  • βœ… CI/CD ready

Testing Excellence

  • βœ… 70+ automated tests
  • βœ… 5 test layers (UI, API, DB, Contract, Performance)
  • βœ… Page Object Model (POM)
  • βœ… JSON Schema validation
  • βœ… Allure reports with video & screenshots
  • βœ… Test history & trends
  • βœ… Flaky test detection

πŸ“Š Test Coverage

Component Coverage Tests
Backend 95%+ 50+ unit & integration tests
Frontend 90%+ 30+ unit tests
E2E Full 40+ UI tests
API 100% 20+ API tests
Database 100% 15+ DB tests
Performance - 4 scenarios (Load, Stress, Spike, Endurance)

🚒 Deployment

Backend Deployment

cd backend
npm run prisma:generate
npm run prisma:migrate
npm start

Frontend Deployment

cd frontend
npm run build
# Serve dist/ folder with nginx/apache

Environment Variables

See backend/ENV_SETUP.md for complete list.


🀝 Contributing

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

πŸ“ License

ISC License - See LICENSE file for details.


πŸŽ‰ Summary

This is a production-ready full-stack application with:

  • βœ… Complete authentication system
  • βœ… RESTful API with Swagger docs
  • βœ… Modern Vue 3 frontend
  • βœ… Enterprise-grade testing (70+ tests, 5 layers)
  • βœ… Security best practices
  • βœ… Comprehensive documentation
  • βœ… 95%+ test coverage

Ready to use! πŸš€


πŸ†˜ Support


Happy Coding! 🎊

About

My independent project to practice Full Stack development Vue3 & node/express, E2E QA Automation, Playwright, Allure Report, Page Object Model with JavaScript & GitHub Actions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors