Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Enhanced Testing Infrastructure & Security Features #31

Merged
merged 48 commits into from
Nov 14, 2024
Merged

Conversation

samjcombs
Copy link
Collaborator

@samjcombs samjcombs commented Nov 12, 2024

🚀 Enhanced Testing Infrastructure & Security Features

Overview

This PR upgrades end-to-end testing, logging, and security for sensitive data management.

Key Changes

1. End-to-End Testing Infrastructure

  • Cypress E2E Testing: Leveraged InstantMock to mock Apollo API responses.
  • Test Modes (Record/Play/Test): e2e-record, e2e-play, and e2e-test NODE_ENV modes unlocked for easy creation of e2e fixtures with npm run e2e:record and easy e2e testing with npm run e2e:test
  • CI Pipeline: Automated E2E tests on branch pushes

2. Enhanced Logging System

  • Pino Integration: Much prettier logs unlocked (pretty, colored output in dev, and JSON logging on prod for easy ingestion into cloud logging platforms)

3. Security Enhancements

  • AES-256-GCM Encryption: Encrypt sensitive data with AES-256-GCM.
    • Algorithm: AES-256-GCM
    • Key Size: 256 bits
    • IV Size: 96 bits

4. Documentation & Code Quality

  • Enhanced Type Safety and modular structure improvements

Testing

  • Local Commands: "e2e:record": "ts-node scripts/run-e2e-tests.ts record", "e2e:test": "ts-node scripts/run-e2e-tests.ts test".

Security Considerations

  • Sensitive Data: Proper encryption and management of keys.

Related Documentation

  • Security: docs/security/encryption.md

Breaking Changes

  • New Variable: ENCRYPTION_KEY required for apollo api key persistence across restarts/servers
  • Schema Update: Encrypted API key storage.

Next Steps

  • Documentation: Migrate to Docusaurus or MkDocs.
  • Test Coverage: Expand unit testing coverage of all utitlities. Expand E2E testing with more user journeys -- now we support just one, the main one ;)
  • Monitoring: Add structured logging for observability.
  • Updated ReadME: A well needed refresh to the readme is in flight!

@samjcombs samjcombs marked this pull request as ready for review November 14, 2024 17:10
@samjcombs samjcombs merged commit 24357db into main Nov 14, 2024
1 check passed
@samjcombs samjcombs changed the title Feat: initial CI setup + bare minimum e2e test 🚀 Enhanced Testing Infrastructure & Security Features Nov 14, 2024
@samjcombs samjcombs deleted the smoke-test branch November 14, 2024 20:07
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.

2 participants