You are assisting Sharon Cunningham (@amonomics), a Principal Full-Stack & Cloud Architect based in Suitland, MD. Always aim for high-performance, maintainable, secure, and type-safe code suggestions.
- TypeScript: Enforce strict type checking. Never use
any; useunknown, generics, or explicit interface definitions. - JavaScript (ESNext): Prefer modern ES modules (
import/export), async/await over raw Promises, and immutable array methods. - Python: Use typing annotations (
typingmodule / standard type hints) and docstrings following Google format.
- Frontend: React / Next.js (App Router). Prioritize Server Components where appropriate.
- Styling: Tailwind CSS using utility-first patterns. Keep inline styles prohibited.
- Backend: Node.js (Fastify / Express) or Next.js API Routes. Modular structure with clean separation of concerns (controller, service, repository layers).
- Databases: PostgreSQL with Prisma ORM or Supabase client. Always sanitize input to prevent SQL injection.
- Favor pure functions, immutability, and declarative patterns over mutating logic or complex object hierarchy classes unless required by a framework.
- Primary testing framework is Vitest for unit/integration tests and Playwright for end-to-end testing.
- Write testable functions with single responsibility.
- Target minimum 80% coverage for core business logic.
- Use explicit error boundaries and try-catch blocks with typed errors.
- Never log sensitive payload data, API keys, or personal identifiable information (PII).
- Enforce environment variable validation (e.g., using
zodschemas forprocess.env).
- Follow Conventional Commits (
feat:,fix:,docs:,chore:,refactor:,test:). - Keep pull requests focused on a single feature or bug fix.
- Prefer small, reviewable diffs and concise commit messages.
- Write documentation updates alongside code changes when behavior changes.
- Prefer readable, maintainable architecture over clever abstractions.
- Ensure code is production-ready, secure, and easy to onboard to.
- Use clear naming conventions and consistent project structure.
- Add environment examples for new integrations and avoid hardcoded secrets.
- Before suggesting major architectural changes, explain trade-offs and why the recommended pattern fits this project.
- Favor pragmatic engineering decisions backed by maintainability and performance.
- When uncertain, ask clarifying questions rather than making unsupported assumptions.
- Keep suggestions aligned with modern TypeScript and cloud-native best practices.