create-expo-fullstack
v0.1.0
Published
Bootstrap fullstack mobile applications with Expo and your choice of backend framework
Maintainers
Readme
create-expo-fullstack
Bootstrap fullstack mobile applications with Expo and your choice of backend framework.
🚀 Quick Start
npm create expo-fullstack@latest my-app
# or
npx create-expo-fullstack my-app✨ Features
- 🎨 Expo for cross-platform mobile development (iOS, Android, Web)
- ⚡ Multiple backend options: FastAPI (Python), Express (TypeScript), NestJS (TypeScript)
- 🐳 Docker Compose for easy development environment
- 📦 Multiple database options: PostgreSQL, MySQL, MongoDB (optional)
- 🔐 Authentication options: JWT, OAuth (Google, Apple, GitHub, Facebook), or both (optional)
- 🧪 Testing setup included for both mobile and backend
- 🎯 TypeScript & Python type safety out of the box
- 📝 API documentation auto-generated (Swagger/OpenAPI)
- 🔄 Hot reload for rapid development
- 📱 Production-ready project structure
🛠️ Backend Options
FastAPI (Python)
Best for: Machine learning, data science, Python developers
Includes:
- FastAPI with Uvicorn
- SQLAlchemy ORM + Alembic migrations
- Pytest for testing
- Ruff + mypy for linting and type checking
- Docker with
uvpackage manager
Express (TypeScript)
Best for: Simple APIs, flexibility, TypeScript developers
Includes:
- Express with TypeScript
- Prisma ORM
- Jest for testing
- ESLint + Prettier
- Docker with pnpm
NestJS (TypeScript)
Best for: Enterprise applications, structured architecture
Includes:
- NestJS framework
- TypeORM
- Jest for testing (built-in)
- ESLint + Prettier
- Swagger/OpenAPI documentation
- Docker with pnpm
📋 Prerequisites
- Node.js 18 or higher
- Docker (optional but recommended)
- Git
Backend-specific:
- Python 3.11+ & uv (for FastAPI)
- pnpm (for Express/NestJS)
🎯 Usage
Interactive Mode
npm create expo-fullstack@latestYou'll be prompted to configure:
- Project name
- Backend framework (FastAPI/Express/NestJS)
- Database (PostgreSQL or none)
- Authentication (JWT or none)
- Bundle identifiers for iOS/Android
- Port numbers
- Dependency installation
- Git initialization
With CLI Arguments
npm create expo-fullstack@latest my-app -- --backend fastapi --db postgresCLI Options
--backend <framework> Backend framework (fastapi|express|nestjs)
--db <database> Database (postgres|mysql|mongodb|none)
--authentication <type> Authentication (jwt|oauth|both|none)
--oauth-providers <list> OAuth providers (google,apple,github,facebook)
--no-install Skip dependency installation
--no-git Skip git initialization
--help Show help📁 Generated Project Structure
my-app/
├── mobile/ # Expo mobile application
│ ├── src/
│ │ ├── api/ # API client
│ │ ├── components/ # Reusable components
│ │ ├── contexts/ # React contexts (Auth, etc.)
│ │ ├── screens/ # App screens
│ │ └── types/ # TypeScript types
│ ├── app.json
│ ├── package.json
│ └── Dockerfile
├── backend/ # Backend application
│ ├── app/ # (FastAPI) or src/ (Express/NestJS)
│ │ ├── routes/ # API routes
│ │ ├── models/ # Database models
│ │ └── auth/ # Authentication (if enabled)
│ ├── tests/
│ ├── Dockerfile
│ └── pyproject.toml # (FastAPI) or package.json
├── docker-compose.yml # Docker services configuration
├── .env # Environment variables
├── .env.example
├── .gitignore
└── README.md🚀 Development
Using Docker (Recommended)
cd my-app
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose downServices will be available at:
- 📱 Mobile app: http://localhost:8081
- 🔧 Backend API: http://localhost:8080
- 📚 API Documentation: http://localhost:8080/docs
- 🗄️ Database Admin (Adminer): http://localhost:8082
Local Development
Backend
FastAPI:
cd backend
uv sync
uv run alembic upgrade head # If using database
uv run uvicorn app.main:app --reloadExpress/NestJS:
cd backend
pnpm install
pnpm prisma migrate dev # If using database (Express)
pnpm devMobile
cd mobile
yarn install
yarn start🔐 Authentication
When authentication is enabled, the project includes:
JWT Authentication
- User registration and login endpoints
- JWT token generation and validation
- Password hashing (bcrypt)
- Protected route decorators/middleware
- Email/password user model
API Endpoints:
POST /auth/register- Register new userPOST /auth/login- Login and receive JWTGET /auth/me- Get current user profilePOST /auth/logout- Logout
OAuth/Social Authentication
- Google OAuth 2.0
- Apple Sign-In
- GitHub OAuth
- Facebook Login
- Automatic user creation/linking
- Profile picture support
API Endpoints (per provider):
GET /auth/{provider}- Initiate OAuth flowGET /auth/{provider}/callback- OAuth callback handler
Mobile
AuthContextfor state management- Secure token storage (Expo SecureStore)
- Login/Register screens (JWT)
- OAuth button components
- WebBrowser-based OAuth flow
- Protected route navigation
🧪 Testing
Backend
cd backend
# FastAPI
uv run pytest
# Express/NestJS
pnpm testMobile
cd mobile
yarn test🚢 Deployment
Backend Deployment
Recommended platforms:
Steps:
- Set environment variables in your platform
- Configure database connection
- Run migrations
- Deploy backend code
Mobile Deployment
For App Stores:
cd mobile
# Build for production
expo build:android
expo build:ios
# Or use EAS Build
eas build --platform allUpdate API URL:
Set EXPO_PUBLIC_API_BASE_URL to your production backend URL.
📦 What's Included
Mobile (Expo)
- ✅ Expo SDK (latest)
- ✅ TypeScript configured
- ✅ React Navigation setup
- ✅ API client with Axios
- ✅ Environment configuration
- ✅ Testing with Jest
- ✅ ESLint + Prettier
- ✅ Auth context (if enabled)
Backend (All)
- ✅ RESTful API structure
- ✅ Database ORM configured
- ✅ Migration system
- ✅ Testing framework
- ✅ Linting + formatting
- ✅ Docker setup
- ✅ Health check endpoint
- ✅ CORS configured
- ✅ Environment validation
- ✅ API documentation
DevOps
- ✅ Docker Compose for local development
- ✅ PostgreSQL container (if enabled)
- ✅ Adminer for database management
- ✅ Hot reload for all services
- ✅ Volume mounts for development
- ✅ Health checks
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📝 License
MIT
🙏 Acknowledgments
Inspired by:
📖 Documentation
For more detailed documentation, visit our docs (coming soon).
💬 Support
- 📧 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
🗺️ Roadmap
- [x] Add more database options (MySQL, MongoDB)
- [x] Add OAuth/Social authentication (Google, Apple, GitHub, Facebook)
- [ ] Add GraphQL option
- [ ] Add CI/CD templates (GitHub Actions, GitLab CI)
- [ ] Add monorepo support (Turborepo, Nx)
- [ ] Add web app template (Next.js)
- [ ] Add more backend options (Go, Rust)
- [ ] Add database migration commands to generated projects
- [ ] Add end-to-end testing setup
Happy coding! 🚀
Made with ❤️ by the create-expo-fullstack team
