Skip to main content

Installation Guide

This guide will walk you through setting up the RIS Gran Chimú mobile app on your local development machine.

Prerequisites

Before installing the app, ensure you have the following tools installed:
1

Install Node.js

Download and install Node.js (version 18 or higher recommended).
# Verify installation
node --version
npm --version
The app uses npm as its package manager. You can also use yarn if preferred.
2

Install Expo Go App

Install the Expo Go app on your mobile device to test the application:This app allows you to scan QR codes and instantly preview your development build.
3

Install Git (Optional)

If you plan to clone the repository, ensure Git is installed:
# Verify Git installation
git --version

Installation Steps

1

Clone the Repository

Clone the RIS Gran Chimú source code to your local machine:
git clone <repository-url>
cd ris-gran-chimu
Alternatively, if you have the source code as a zip file, extract it and navigate to the directory.
2

Install Dependencies

Install all required npm packages:
npm install
This will install all dependencies listed in package.json, including:
  • Expo SDK 54
  • React Native 0.81
  • Axios for API calls
  • Expo Router for navigation
  • TypeScript and all development tools
The installation may take a few minutes depending on your internet connection.
3

Configure API Endpoint

Configure the backend API URL in src/services/apiClient.ts.Open the file and verify or update the BASE_URL:
src/services/apiClient.ts
const BASE_URL = 'https://ris-gran-chimu-backend.vercel.app/api';
Options:
  • Production: Use https://ris-gran-chimu-backend.vercel.app/api (default)
  • Local Development: Use http://localhost:3000/api if running the backend locally
  • Custom Server: Replace with your own backend URL
If testing on a physical device with a local backend, use your computer’s local network IP address (e.g., http://192.168.1.100:3000/api) instead of localhost.
4

Verify Installation

Verify that everything is set up correctly:
# Check for TypeScript errors
npx tsc --noEmit

# Run linter
npm run lint
If no errors appear, your installation is complete!

Project Structure

After installation, your project directory will contain:
ris-gran-chimu/
├── app/                  # Application routes (Expo Router)
│   ├── (auth)/           # Authentication screens
│   ├── (main)/           # Main dashboard
│   └── landing/          # Public landing pages
├── src/
│   ├── components/       # Reusable UI components
│   ├── hooks/            # Custom React hooks
│   ├── services/         # API client and services
│   ├── types/            # TypeScript type definitions
│   └── context/          # React contexts
├── assets/               # Images, logos, splash screens
├── app.json              # Expo configuration
├── package.json          # Dependencies and scripts
└── tsconfig.json         # TypeScript configuration

Key Dependencies

The app includes these major dependencies:
  • expo (~54.0.33): Development framework
  • react (19.1.0): UI library
  • react-native (0.81.5): Mobile framework
  • typescript (~5.9.2): Type safety
  • axios (^1.12.2): HTTP client
  • expo-secure-store (~15.0.8): Secure token storage
  • @react-native-async-storage/async-storage (^2.2.0): Local storage
  • lucide-react-native (^0.542.0): Icon library
  • expo-blur (~15.0.8): Blur effects
  • expo-haptics (~15.0.8): Haptic feedback

Troubleshooting

Try running the command with elevated permissions or fixing npm permissions:
# On macOS/Linux
sudo npm install

# Or fix npm permissions (recommended)
npm config set prefix ~/.npm-global
If port 8081 is already in use:
# Kill the process on port 8081
npx kill-port 8081

# Or start on a different port
npx expo start --port 8082
Clear the cache and reinstall:
# Clear npm cache
npm cache clean --force

# Remove node_modules and reinstall
rm -rf node_modules package-lock.json
npm install

Next Steps

Quick Start

Get the app running on your device in 5 minutes

API Reference

Learn about the backend API integration

Build docs developers (and LLMs) love