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.
- Host: GitHub
- URL: https://github.com/pavlovic-bojan/todo-app
- Owner: pavlovic-bojan
- Created: 2025-11-03T17:10:48.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-12-07T17:28:51.000Z (6 months ago)
- Last Synced: 2025-12-09T19:33:35.816Z (6 months ago)
- Topics: api-rest, bootstrap, ci-cd, contract-testing, css, db-testing, deployment-automation, e2e, express, html, load-testing, node, performance-testing, playwright, postgresql, todoapp, vue3
- Language: JavaScript
- Homepage: https://todo-app-frontend-seven-rho.vercel.app
- Size: 266 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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!** ๐