Prerequisites
Before you begin, ensure you have the following installed on your system:Node.js
Version 18.x or higher recommended
npm
Comes bundled with Node.js
Expo CLI
For React Native development
PostgreSQL
Required for the backend database
Initial Setup
Install dependencies
Install all project dependencies using npm:This will install both production and development dependencies including:
- React Native and Expo framework
- Express server dependencies
- Drizzle ORM for database management
- TypeScript and linting tools
Configure environment variables
Set up your environment variables for database connection:
The
DATABASE_URL is required for Drizzle ORM to connect to your PostgreSQL database.Development Environment Options
Expo Development (Mobile)
For React Native mobile development, use the Expo development server:- Starts the Expo development server
- Enables hot reload for rapid development
- Sets up proxy URLs for Replit environment (if applicable)
- Allows testing on physical devices or emulators
The development server includes special environment variables for Replit deployment:
EXPO_PACKAGER_PROXY_URLREACT_NATIVE_PACKAGER_HOSTNAMEEXPO_PUBLIC_DOMAIN
Backend Development
Run the Express server in development mode:tsx to run TypeScript files directly with hot reload enabled.
Running Both Concurrently
For full-stack development, you’ll need to run both the Expo client and the backend server in separate terminal windows:IDE Setup
VS Code Recommended Extensions
ESLint
Lint your code with the Expo ESLint configuration
Prettier
Format code automatically on save
TypeScript
Enhanced TypeScript support
React Native Tools
Debugging and IntelliSense for React Native
TypeScript Configuration
The project uses strict TypeScript settings:@/*→ maps to./client/*@shared/*→ maps to./shared/*
Code Quality Tools
Linting
The project uses ESLint with Expo’s configuration and Prettier integration:Type Checking
Run TypeScript type checking without emitting files:Code Formatting
- JavaScript (
.js) - TypeScript (
.ts,.tsx) - CSS files
- JSON files
Troubleshooting
Metro bundler cache issues
Metro bundler cache issues
If you encounter strange errors with the Metro bundler, try clearing the cache:
Database connection errors
Database connection errors
Ensure your
DATABASE_URL environment variable is set correctly and your PostgreSQL server is running:Native module errors
Native module errors
Some dependencies require native modules. If you see errors related to native modules, try:
TypeScript path alias not working
TypeScript path alias not working
Path aliases are configured in three places:
tsconfig.jsonfor TypeScriptbabel.config.jsfor runtime resolution
Next Steps
Project Structure
Learn about the codebase organization
Available Scripts
Explore all npm scripts and commands
Testing
Set up and run tests
Program Management
Understand the Rippler program structure