An open API service indexing awesome lists of open source software.

https://github.com/pavlovic-bojan/todo-app

My independent project to practice Full Stack development Vue3 & node/express, E2E QA Automation, Playwright, Allure Report, Page Object Model with JavaScript & GitHub Actions.
https://github.com/pavlovic-bojan/todo-app

api-rest bootstrap ci-cd contract-testing css db-testing deployment-automation e2e express html load-testing node performance-testing playwright postgresql todoapp vue3

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# ๐Ÿ“‹ 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](https://pavlovic-bojan.github.io/todo-app/)
---

## ๐Ÿ—๏ธ 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:**
```bash
npm install
cd backend && npm install
cd ../frontend && npm install
cd ../test && npm install
```

**2. Setup Backend:**
```bash
cd backend
npm run prisma:generate
npm run prisma:migrate
```

**3. Configure Environment:**

Create `backend/.env`:
```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:**

```bash
# Terminal 1 - Backend
cd backend
npm run dev

# Terminal 2 - Frontend
cd frontend
npm run dev
```

**5. Access Application:**
- Frontend: https://todo-app-frontend-seven-rho.vercel.app
- Backend API: https://todo-app-xhn2.onrender.com/api/
- Swagger Docs: https://todo-app-xhn2.onrender.com/api/docs/

---

## ๐Ÿงช Testing

### Run All Tests

```bash
# 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
- **[Backend README](backend/README.md)** - Complete backend API documentation, setup guide, and testing instructions
- **[Frontend README](frontend/README.md)** - Frontend development guide, components, and best practices
- **[Test README](test/README.md)** - Enterprise QA Testing Framework guide with Allure reports
- **[Performance Testing README](test/performance/README.md)** - Performance testing scenarios and metrics

### Quick Links
- **Backend API Docs:** https://todo-app-xhn2.onrender.com/api/docs/
- **Latest Allure Report:** [View Online](https://pavlovic-bojan.github.io/todo-app/)

---

## ๐Ÿ› ๏ธ 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
```bash
cd backend
npm run prisma:generate
npm run prisma:migrate
npm start
```

### Frontend Deployment
```bash
cd frontend
npm run build
# Serve dist/ folder with nginx/apache
```

### Environment Variables
See [backend/ENV_SETUP.md](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

- **Backend Issues:** See [backend/README.md](backend/README.md)
- **Frontend Issues:** See [frontend/README.md](frontend/README.md)
- **Testing Issues:** See [test/README.md](test/README.md)

---

**Happy Coding!** ๐ŸŽŠ