Logto Project Structure

The better identity infrastructure for developers. A modern TypeScript monorepo using Node.js (Koa), React, and PostgreSQL.

Updated 2025-12-30

#logto #typescript #monorepo #pnpm #react #koa #auth
PNGPDF

Project Directory

logto/
packages/
Monorepo workspaces
core/
OIDC/OAuth 2.0 provider logic
src/
package.json
Koa + oidc-provider
console/
Admin Dashboard
src/
vite.config.ts
package.json
React + SWR
experience/
Sign-in/Sign-up UI
connectors/
Social & Email plugins
connector-google/
connector-github/
connector-smtp/
shared/
Shared types & utilities
cli/
Command-line interface
pnpm-workspace.yaml
Workspace config
package.json
Root dependencies
docker-compose.yml
Dev infrastructure

Repository Info

  • Repository-logto-io/logto
  • Stars-12k+
  • License-MPL-2.0
  • Last Analyzed-December 2025

Tech Stack

  • Language-TypeScript
  • Backend-Node.js (Koa)
  • Frontend-React + Vite
  • Database-PostgreSQL
  • Package Manager-pnpm (Workspaces)
  • Auth Engine-node-oidc-provider

Architecture Notes

Logto is a textbook example of a modern TypeScript monorepo. It cleanly separates the 'Auth Engine' (core) from the 'Management UI' (console) and the 'End-User UI' (experience). This separation allows them to scale the authentication logic independently of the administrative dashboard.

Key Directories

  • packages/core/-The heart of the system. Handles the OIDC protocol, token issuance, and user authentication flow.
  • packages/connectors/-A pluggable system for adding identity providers (Google, GitHub) and notification services (SendGrid, Twilio).
  • packages/shared/-Contains TypeScript interfaces and Zod schemas shared between the backend and frontend, ensuring type safety across the network boundary.

Why This Structure?

If you're building a complex full-stack product in TypeScript, study Logto. It demonstrates how to manage multiple frontend and backend applications in a single repo, share code effectively, and build a plugin system (connectors).

Share this template

Related Templates

© 2025 FolderStructure.dev