Skip to content

Repository files navigation

Expo Forge

Forge production-ready Expo applications with a feature-first architecture.

Expo Forge creates a serious Expo Router foundation with TypeScript, TanStack Query, Zustand, Axios, environment config, shared providers, UI primitives, and modular feature scaffolding.

Quick Start

npx create-expo-forge-app my-app
cd my-app
npx expo start

Or install the CLI globally:

npm install -g expo-forge
expo-forge init my-app

Commands

expo-forge init my-app
expo-forge generate feature booking
expo-forge doctor
expo-forge --help

Project and feature names must be lowercase kebab-case, for example my-app or user-profile.

Generated App Architecture

src/
  api/             TanStack Query client and server-state configuration
  app/             Expo Router screens and layouts
  components/ui/   Reusable screen, loading, and empty states
  config/          Runtime environment config
  constants/       Shared constants
  features/        Domain modules generated by the CLI
  hooks/           Shared hooks
  lib/             API client and shared infrastructure
  providers/       App-level providers
  store/           Global Zustand stores
  theme/           Design tokens
  types/           Shared TypeScript types
  utils/           Shared utilities

The generated project includes:

  • Expo Router configured through expo-router/entry
  • Strict TypeScript with @/* path aliases
  • A production-oriented Axios client with normalized API errors
  • TanStack Query defaults for caching, retries, and mutation behavior
  • Zustand stores for app/session state and feature-local UI state
  • Shared UI primitives for consistent screens, loading states, and empty states
  • app.config.ts and .env.example for runtime configuration

Feature Modules

expo-forge generate feature user-profile

Generates:

src/features/user-profile/
  api/use-user-profile.ts
  components/user-profile-card.tsx
  hooks/
  services/user-profile.service.ts
  store/use-user-profile-store.ts
  types/index.ts
  utils/
  user-profile-screen.tsx
  index.ts

Import from the module's public API:

import { UserProfileScreen, useUserProfileList } from '@/features/user-profile';

Publishing

Before publishing:

npm test
npm run lint
npm pack --dry-run

Publish to GitHub Packages:

npm login --scope=@moasko --auth-type=legacy --registry=https://npm.pkg.github.com
npm run publish:github

Use your GitHub username as the username and a GitHub personal access token (classic) with write:packages as the password.

Publish to npmjs:

npm run publish:latest

License

MIT

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages