Skip to content

Initial project setup for TelemetryTaco - #1

Merged
BarryHenryJr merged 16 commits into
mainfrom
telemetry-taco-initial-setup
Dec 20, 2025
Merged

BarryHenryJr merged 16 commits into
mainfrom
telemetry-taco-initial-setup

Conversation

@BarryHenryJr

Copy link
Copy Markdown
Collaborator

Add backend (Django, Celery, Ninja API), frontend (React, TypeScript, Tailwind, Shadcn UI), SDK, Docker, and CI/CD configuration. Includes core event ingestion, async processing, real-time dashboard, and development guidelines.

Add backend (Django, Celery, Ninja API), frontend (React, TypeScript, Tailwind, Shadcn UI), SDK, Docker, and CI/CD configuration. Includes core event ingestion, async processing, real-time dashboard, and development guidelines.
Copilot AI review requested due to automatic review settings December 20, 2025 00:01
@BarryHenryJr BarryHenryJr self-assigned this Dec 20, 2025
Replaces all 'docker-compose' commands with 'docker compose' for compatibility with newer Docker versions. Adds installation of the Poetry export plugin to support exporting dependencies. Also sets 'load: true' in Docker build step to load the image into Docker after building.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR establishes the initial project setup for TelemetryTaco, a lightweight telemetry tool designed to correlate feature usage with system health in real-time.

Key Changes:

  • Complete backend infrastructure using Django 5.0, Celery for async processing, and Django Ninja for type-safe REST APIs
  • React/TypeScript frontend with Tailwind CSS and Shadcn UI components for the dashboard
  • Python SDK for non-blocking event capture using background threads
  • Docker Compose setup for local development with PostgreSQL and Redis
  • Comprehensive CI/CD pipeline with linting, testing, security scanning, and Docker builds

Reviewed changes

Copilot reviewed 46 out of 52 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
sdk/telemetry_taco.py Python SDK implementation with threading for non-blocking event capture
backend/telemetry_taco/settings.py Django settings with environment-based configuration
backend/core/models.py Event model with JSONB properties and optimized indexes
backend/core/api.py Django Ninja API endpoints for event capture and insights
backend/core/tasks.py Celery task for async event processing
frontend/src/hooks/useEventStream.ts React hook for polling event data
frontend/src/components/LiveEventStream.tsx Real-time event stream UI component
frontend/src/components/InsightChart.tsx Event visualization chart component
docker-compose.yml Multi-service Docker setup with health checks
.github/workflows/cicd.yml Complete CI/CD pipeline with testing and security scanning
README.md Comprehensive documentation with architecture diagrams and scaling strategy
.cursor/rules/generalguidelines.mdc Development guidelines for frontend and backend
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sdk/telemetry_taco.py Outdated
Comment thread backend/telemetry_taco/settings.py Outdated
Comment thread .github/workflows/cicd.yml Outdated
Comment thread sdk/telemetry_taco.py Outdated
Comment thread backend/telemetry_taco/settings.py Outdated
Comment thread .github/workflows/cicd.yml Outdated
Comment thread backend/Dockerfile Outdated
Comment thread backend/core/admin.py Outdated
Comment thread backend/core/tests.py Outdated
Comment thread backend/core/views.py Outdated
Expanded README with detailed setup and troubleshooting instructions, added backend/SETUP.md for step-by-step backend setup, and introduced check_db.py for database connectivity diagnostics. Updated backend Dockerfile for reproducible builds, added index renaming migration, and improved validation in process_event_task. Minor cleanups in admin.py, tests.py, and views.py.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 49 out of 56 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/Dockerfile Outdated
Introduced Ruff as a development dependency and added its configuration to pyproject.toml, specifying linting rules, line length, target Python version, and known first-party modules.
Pinned Poetry version in Dockerfile for supply-chain security and updated installation method. Improved code formatting, import ordering, and minor style fixes across backend scripts, including check_db.py, core/api.py, core/tasks.py, and settings. No functional changes to business logic; changes focus on maintainability, clarity, and best practices.
Copilot AI review requested due to automatic review settings December 20, 2025 00:49
Introduced a .bandit configuration file to skip common false positives and unnecessary directories in security scans. Updated the CI workflow to use this config, generate and upload Bandit reports, and improved Ruff linter command. Marked the Django dev secret key with a 'nosec' comment to suppress Bandit warning B107.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 50 out of 57 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/Dockerfile Outdated
Renamed and converted Bandit config to YAML for better clarity and maintainability, updated CI workflow to use the new config file, and switched Poetry installation in Dockerfile to use pip for integrity verification. Minor formatting fix in Django settings.
This commit updates all backend Python files to use consistent double quotes for strings and improves code formatting for readability. It also enhances the CI workflow to provide clearer feedback and PR comments when code formatting issues are detected by Ruff. No functional logic is changed; these are style and developer experience improvements.
Copilot AI review requested due to automatic review settings December 20, 2025 03:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 50 out of 57 changed files in this pull request and generated 5 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/telemetry_taco/settings.py Outdated
Comment thread backend/Dockerfile Outdated
Comment thread backend/core/api.py Outdated
Comment thread backend/core/api.py
Comment thread sdk/telemetry_taco.py
Integrates CodeQL security analysis into CI/CD workflow and adds a CodeQL configuration file. Enforces explicit SECRET_KEY configuration in all environments with stricter validation in Django settings. Adds django-ratelimit and django-redis dependencies, configures Redis cache for rate limiting, and applies per-IP rate limits to API endpoints. Updates backend Dockerfile to allow Poetry patch updates. Improves SDK flush method to enforce a total timeout across all threads.
Introduces start.sh and stop.sh scripts for unified local development startup and shutdown, a Makefile with common dev targets, and updates the README with quick start instructions and command references. Updates .gitignore for new log and PID files, enhances package.json scripts for easier service management, and improves CI workflow to handle Poetry lock updates. Adds new backend dependencies in poetry.lock.
Copilot AI review requested due to automatic review settings December 20, 2025 03:36
@github-advanced-security

Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 54 out of 61 changed files in this pull request and generated 6 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sdk/telemetry_taco.py Outdated
Comment thread backend/telemetry_taco/settings.py
Comment thread backend/Dockerfile Outdated
Comment thread stop.sh Outdated
Comment thread start.sh Outdated
Comment thread start.sh Outdated
Updated SECRET_KEY values in CI/CD workflow for better validation and security practices. Added new validation scripts for backend and frontend in package.json files to streamline linting, formatting, and type-checking processes.
Introduces a Django management command to seed the database with realistic historical event data using Faker. Adds Makefile targets, shell scripts for seeding and backend restart, and updates rate limit logic for development. Also updates dependencies to include Faker and adds related npm scripts.
Copilot AI review requested due to automatic review settings December 20, 2025 04:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 58 out of 67 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/SETUP.md Outdated
Comment thread backend/Dockerfile Outdated
Comment thread start.sh Outdated
Comment thread start.sh Outdated
This update enhances the development and CI experience by generating secure Django SECRET_KEY values automatically, updating documentation to require secure keys, and enforcing validation against insecure defaults. The CI workflow now posts Bandit security scan results as PR comments and improves backend service startup reliability. The SDK now uses daemon threads to prevent hangs, and process management in start/stop scripts is more robust and cross-platform.
Adds a CodeQL config file, updates pnpm to version 9, and sets explicit permissions for lint and security jobs. Adjusts test execution to use one-off containers to prevent OOM issues and reorders backend service startup for improved reliability.
Copilot AI review requested due to automatic review settings December 20, 2025 04:33
@github-actions

github-actions Bot commented Dec 20, 2025

Copy link
Copy Markdown

🔒 Bandit Security Scan Results

No security issues found!

Click to view scan summary
[main]	INFO	profile include tests: None
[main]	INFO	profile exclude tests: B101,B104,B108,B506,B601,B301,B201,B106,B105
[main]	INFO	cli include tests: None
[main]	INFO	cli exclude tests: None
[main]	INFO	using config: bandit.yaml
[main]	INFO	running on Python 3.11.14
Run started:2025-12-20 05:06:15.882677+00:00

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 516
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 14

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 58 out of 67 changed files in this pull request and generated 7 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread start.sh
Comment thread start.sh Outdated
Comment thread sdk/telemetry_taco.py Outdated
Comment thread backend/core/api.py Outdated
Comment thread backend/core/api.py Outdated
Comment thread README.md Outdated
Comment thread stop.sh Outdated
API rate limits are now configurable via environment variables, with sensible defaults based on the ENVIRONMENT setting. Updated documentation and setup scripts to guide users in generating secure SECRET_KEY values, and improved process validation in stop.sh for safer shutdowns. Also added security comments to random usage in seed_events.py.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 58 out of 67 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread start.sh
Comment thread sdk/telemetry_taco.py Outdated
Comment thread sdk/telemetry_taco.py Outdated
Comment thread sdk/telemetry_taco.py Outdated
Added a robust safe_kill_process function to start.sh for safer process termination with validation, replacing direct kill commands in the cleanup function. Refactored timeout logic in TelemetryTaco to clarify start_time handling and improve code readability.
@BarryHenryJr
BarryHenryJr merged commit 75133ee into main Dec 20, 2025
9 checks passed
@BarryHenryJr
BarryHenryJr deleted the telemetry-taco-initial-setup branch December 20, 2025 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants