|
|
|
|
|
by vivzkestrel
269 days ago
|
|
AI cannot do anything meaningful beyond basic functions and boilerplatey stuff with moderate difficulty. Don't believe me? Ask your AI model to generate a production grade typescript 5.x application with a tsconfig.json file that uses ts-node instead of tsx with path aliases configured and uses biome 2.x for linting formatting. Add vitest for testing library with graceful shutdowns that handle SIGTERM and SIGINT events from your express server wih an ioredis connection that can be shut down gracefully along with using pg-promise to open a postgresql connection. Make it use @dotenvx/dotenvx for managing development, testing, staging and production environments. Add commitlint to ensure all git commit messages adhere to a specific format. Ask it to add lefthook along with a configuration file for running, lint format and test jobs on every commit. Now add pino and pino-http with custom serializers to redact passwords, tokens and apiKeys from the logging output. Development version of the logs should be pretty printed, production version of the logs should be optimized JSON sent to a cloudwatch log transport. Add CORS to handle frontends running on localhost:5173 for development, https://example.com for production and add helmet for managing security loopholes. Add CSRF protection to all POST, PATCH and PUT routes in the application. Generate 4 different docker files, one for development, one for staging, one for testing and one for production. The development and testing versions should run a separate postgres and redis container with whom we have seamless networking setup. Development versions use self signed SSL certificates at every level. The staging and production environments should connect with an actual elasticache and RDS instance supplied. Both staging and production use actual SSL certificates. We also need Github actions for CI / CD with templates for pull requests, feature requests and tasks to run tests on PR with dependabot updates completely disabled. We need NGINX running as forward proxy to this endpoint with SSL certificates generated by letsencrypt that are auto rotated. Talk to me when your AI model can generate 10% of this setup |
|