Skip to content

zeiss-digital-innovation/copilot-sample-app

Repository files navigation

TaskFlow - Simple Task Management App

A minimal task management application built for the GitHub Copilot workshop.

Features

  • ✅ Create, read, update, and delete tasks
  • ✅ Mark tasks as completed
  • ✅ Simple and clean user interface
  • ✅ SQLite database (no external dependencies)
  • ✅ REST API

Tech Stack

  • Backend: Node.js + Express
  • Database: SQLite3
  • Frontend: Vanilla HTML/CSS/JavaScript
  • Testing: Playwright

Prerequisites

You can run this application either locally or using the devcontainer:

Option 1: Local Development

Requires the following tools installed on your machine:

  • Node.js (version 22 or higher recommended)
  • npm (comes with Node.js)

Option 2: DevContainer (Recommended)

Requires:

  • Container Runtime: Docker Desktop, Rancher Desktop, or Podman Desktop
  • VS Code with Dev Containers extension
  • GitHub Copilot Chat extension (authenticated before opening the devcontainer)

See .devcontainer/README.md for detailed devcontainer setup instructions. If GitHub Copilot cannot connect from inside the devcontainer, especially behind Zscaler on Docker Desktop for Windows, check the troubleshooting section there for proxy-related workarounds.

Installation

  1. Install dependencies
    npm install

Security note (npm audit)

You may see npm audit report high-severity vulnerabilities in transitive packages like tar, glob, or minimatch. In this project they come from sqlite3's native build / install toolchain dependencies (for example node-gyp and archive extraction), not from code we call directly at runtime.

npm audit fix --force may suggest a breaking downgrade to sqlite3@5.0.2. We intentionally do not apply that here because it does not meaningfully improve the workshop app and can increase churn. If you need a “clean audit” for another context, consider swapping the SQLite driver (for example better-sqlite3) and pinning Node to a supported LTS.

Running the App

Development mode (with auto-restart)

npm run dev

Production mode

npm start

The app will be available at http://localhost:3000

API Endpoints

Tasks

  • GET /api/tasks - Get all tasks
  • GET /api/tasks/:id - Get a single task
  • POST /api/tasks - Create a new task
    {
      "title": "Task title",
      "description": "Task description (optional)"
    }
  • PUT /api/tasks/:id - Update a task (all fields required)
    {
      "title": "Updated title",
      "description": "Updated description",
      "completed": 1
    }
  • DELETE /api/tasks/:id - Delete a task

Project Structure

copilot-sample-app/
├── src/
│   ├── database/
│   │   ├── db.js           # Database connection
│   │   └── init.js         # Database initialization
│   ├── routes/
│   │   └── tasks.js        # Task API routes
│   └── server.js           # Express server setup
├── public/
│   ├── index.html          # Frontend UI
│   ├── styles.css          # Styles
│   └── app.js              # Frontend JavaScript
├── package.json
└── README.md

Testing

Playwright is configured for E2E testing. Test files can be added in a tests/ directory with the .spec.js extension.

Run tests:

npm test

Run tests in headed mode (see browser):

npm run test:headed

Workshop Exercises

This app intentionally has some missing features that will be added during the workshop:

  1. Input Validation - Add validation to task endpoints
  2. Comments Feature - Add ability to comment on tasks
  3. Priority System - Add task priorities (High/Medium/Low)
  4. Due Dates - Add due dates to tasks (demonstrated in workshop)

License

MIT

About

Simple task management app for GitHub Copilot workshop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors