$ account netlify
GoTrue is a self-contained user registration and authentication API written in Go. It provides endpoints for signup, login (via email/password or OAuth2 providers like GitHub, GitLab, Google, Bitbucket, Facebook), token refresh, password recovery, email verification, and user management (CRUD for admin users). The architecture is a monolithic HTTP API using the chi router, backed by a MySQL database (via pop/v5 ORM) and a configurable mailer (SMTP or noop). It supports both single-tenant and multi-tenant deployments, with JWT-based authentication (HS256) and optional SAML SSO. The codebase is well-organized into packages: api for HTTP handlers, models for database entities, conf for configuration, mailer for email sending, and crypto for security utilities. It includes extensive unit tests and integration tests using a MySQL test database.
This is the official Netlify CLI (netlify/cli), a comprehensive Node.js command-line tool for managing the Netlify platform. It provides commands for local development (`netlify dev`), deployment (`netlify deploy`), serverless and edge functions, environment variables, blobs (key-value store), database migrations (local Postgres via PGlite), log streaming, AI agents, and site configuration. The architecture follows a modular command pattern using Commander.js, with each major feature (deploy, dev, functions, etc.) in its own subdirectory. The codebase is well-structured with clear separation of commands, utilities, and libraries. It integrates deeply with Netlify's API and SDKs, and includes extensive integration tests with mock APIs and site builders. While the CLI is production-grade and actively maintained, it carries significant TypeScript type safety debt (hundreds of ESLint suppressions and `@ts-expect-error` comments), and some modules exhibit high complexity (e.g., the deploy command is a ~900-line file). Overall, it is a reliable tool with a strong feature set, but refactoring and type tightening would improve maintainability.