{"id":26830812,"url":"https://github.com/engineerdogita/lazy-todolist-nodejs","last_synced_at":"2025-03-30T14:17:39.284Z","repository":{"id":40572299,"uuid":"251014383","full_name":"EngineerDogIta/lazy-todolist-nodejs","owner":"EngineerDogIta","description":"This is a todolist web application for lazy people","archived":false,"fork":false,"pushed_at":"2025-03-22T12:13:21.000Z","size":4057,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T12:23:23.146Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://lazy-todolist.herokuapp.com/home","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EngineerDogIta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2020-03-29T11:19:24.000Z","updated_at":"2022-05-01T19:59:39.000Z","dependencies_parsed_at":"2023-02-18T10:45:22.303Z","dependency_job_id":null,"html_url":"https://github.com/EngineerDogIta/lazy-todolist-nodejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineerDogIta%2Flazy-todolist-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineerDogIta%2Flazy-todolist-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineerDogIta%2Flazy-todolist-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EngineerDogIta%2Flazy-todolist-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EngineerDogIta","download_url":"https://codeload.github.com/EngineerDogIta/lazy-todolist-nodejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246326763,"owners_count":20759439,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-30T14:17:38.417Z","updated_at":"2025-03-30T14:17:39.276Z","avatar_url":"https://github.com/EngineerDogIta.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lazy TodoList\n\n[![Node.js CI](https://github.com/yourusername/lazy-todolist-nodejs/actions/workflows/node.js.yml/badge.svg)](https://github.com/yourusername/lazy-todolist-nodejs/actions/workflows/node.js.yml)\n[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D14.0.0-brightgreen.svg)](https://nodejs.org/)\n\nA simple, efficient todo list application built with Node.js and Express. Perfect for personal task management with a clean, intuitive interface.\n\n## Table of Contents\n\n- [Features](#features)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Development](#development)\n  - [Production](#production)\n- [Docker Deployment](#docker-deployment)\n- [Configuration](#configuration)\n- [Available Scripts](#available-scripts)\n- [Project Structure](#project-structure)\n- [Logging](#logging)\n- [Database](#database)\n- [Development Tools](#development-tools)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- ✨ Create, read, update, and delete todos\n- 🎨 Simple and intuitive interface\n- 💾 SQLite database for data persistence\n- 📝 Comprehensive logging system with Winston\n- ⚙️ Environment-specific configurations\n- 🛡️ Error handling and monitoring\n- 📊 Request logging with performance tracking\n- 🎯 Pug templating engine\n- 📘 TypeScript support\n- 🧹 ESLint and Prettier for code quality\n\n## Prerequisites\n\n- Node.js (v14 or higher)\n- npm (v6 or higher)\n- Git\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/yourusername/lazy-todolist-nodejs.git\n   cd lazy-todolist-nodejs\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   npm install\n   ```\n\n3. Create a `.env` file in the root directory (optional):\n\n   ```env\n   NODE_ENV=development\n   PORT=8080\n   ```\n\n## Usage\n\n### Development\n\nStart the development server with hot reloading:\n\n```bash\nnpm run dev\n```\n\nThe application will be available at `http://localhost:8080`\n\n### Production\n\nTo run the application in production mode:\n\n```bash\nNODE_ENV=production npm start\n```\n\n## Docker Deployment\n\nThe application can be deployed using Docker with PostgreSQL as the production database.\n\n### Docker Prerequisites\n\n- Docker\n- Docker Compose\n\n### Production Deployment\n\n1. Build and start the containers:\n\n   ```bash\n   docker-compose up --build\n   ```\n\n2. The application will be available at `http://localhost:8080`\n\n### Local Development with Docker\n\nFor local development using Docker:\n\n```bash\ndocker-compose -f docker-compose.dev.yml up --build\n```\n\n## Configuration\n\n### Environment Variables\n\nThe following environment variables can be configured:\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `NODE_ENV` | Application environment | development |\n| `PORT` | Server port | 8080 |\n| `DB_USER` | PostgreSQL username | postgres |\n| `DB_HOST` | PostgreSQL host | postgres |\n| `DB_NAME` | PostgreSQL database name | todolist |\n| `DB_PASSWORD` | PostgreSQL password | postgres |\n| `DB_PORT` | PostgreSQL port | 5432 |\n\n## Available Scripts\n\n| Command | Description |\n|---------|-------------|\n| `npm start` | Start the production server |\n| `npm run dev` | Start the development server with hot reload |\n| `npm run build` | Build the application for production |\n| `npm run clean` | Clean the dist directory |\n| `npm run lint` | Run ESLint to check code style |\n| `npm run format` | Format code using Prettier |\n| `npm test` | Run tests |\n\n## Project Structure\n\n```text\nsrc/\n├── config/\n│   ├── logger.ts         # Winston logger configuration\n│   └── database.ts       # SQLite database configuration\n├── controllers/          # Route controllers\n├── public/              # Static assets (CSS, JS, images)\n├── routes/              # Express routes\n├── views/               # Pug templates\n└── index.ts             # Application entry point\n```\n\n## Logging\n\nThe application uses Winston for structured logging with the following features:\n\n- Multiple log levels (error, warn, info, debug)\n- Environment-specific log formats:\n  - Development: Colorized console output with timestamps\n  - Production: JSON format with full error stack traces\n- Separate log files for errors and combined logs\n- Log rotation with 5MB file size limit and 5 files retention\n- Request logging with duration, status, and user agent info\n- Structured error tracking with context\n\nLogs are stored in:\n\n- Error logs: `logs/error.log`\n- Combined logs: `logs/combined.log`\n\n## Database\n\nSQLite database with automatic table creation:\n\n- Location: `data/database.sqlite`\n- Tables:\n  - tasks (id, title, createdAt, updatedAt)\n\n## Development Tools\n\n- TypeScript for type-safe development\n- ts-node-dev for hot reloading\n- ESLint with TypeScript support\n- Prettier for code formatting\n- Jest for testing\n\n## Contributing\n\nWe welcome contributions! Please follow these steps:\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### Development Guidelines\n\n- Follow the existing code style\n- Add tests for new features\n- Update documentation as needed\n- Ensure all tests pass before submitting PR\n- Add meaningful commit messages\n\n## License\n\nThis project is licensed under the ISC License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineerdogita%2Flazy-todolist-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fengineerdogita%2Flazy-todolist-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineerdogita%2Flazy-todolist-nodejs/lists"}