A React Native mobile application built with Expo, featuring authentication, block sessions management, and more.
- Node.js (v18 or newer recommended)
- Yarn package manager
- Expo CLI (
yarn global add expo-cli
) - iOS Simulator (for Mac users) or Android Studio (for Android development)
-
Clone the repository
git clone <repository-url> cd tiedsiren51
-
Install dependencies
yarn install
-
Set up Prisma (if using database features)
Run Expo prebuild:
yarn prebuild
After initializing Prisma:
- Generate Prisma Client:
npx prisma generate
- Run migrations:
npx prisma migrate dev
- Generate Prisma Client:
Start the development server:
yarn start
# iOS
yarn ios
# Android
yarn android
# Web
yarn web
# Electron
yarn electron:dev
The project uses Vitest for testing. Available test commands:
# Run tests in watch mode
yarn test
# Run tests once (pre-push)
yarn test:prepush
# Run tests with coverage
yarn test:cov
# Run E2E tests with Maestro
yarn test:e2e
# Type checking
yarn typecheck
# Lint code
yarn lint
# Fix linting issues
yarn lint:fix
# Prebuild for all platforms
yarn prebuild
# Build for all platforms
yarn build
# Build for Android
yarn build:android
yarn build:android:local # Local build
yarn build:android:apk # Generate APK
# Build for iOS
yarn build:ios
yarn build:ios:simulator # Build for iOS simulator
├── app/ # Main application code
│ ├── (auth)/ # Authentication screens
│ ├── (tabs)/ # Tab-based screens
│ └── _layout.tsx # Root layout configuration
├── assets/ # Static assets
├── prisma/ # Prisma schema and migrations
├── tests/ # Test files
├── ui/ # UI components
└── core/ # Core business logic
-
Frontend:
expo
: ^51.0.36react
: 18.2.0react-native
: 0.74.5react-native-elements
: ^3.4.3expo-router
: ~3.5.23
-
State Management:
@reduxjs/toolkit
: ^2.2.5react-redux
: ^9.1.2
-
Forms & Validation:
formik
: ^2.4.5zod
: ^3.23.8
-
Database:
pouchdb
: ^8.0.1@prisma/client
-
Testing:
vitest
: ^1.6.0react-test-renderer
: 18.2.0
See the full list of available scripts in package.json
. Key scripts include:
yarn start
: Start the Expo development serveryarn test
: Run testsyarn lint
: Run linting checksyarn build
: Build for all platforms
The project uses Husky for git hooks:
- Pre-commit: Runs linting and type checking
- Pre-push: Runs tests
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.