PayTak is a comprehensive decentralized application (dApp) designed for ride-sharing and transportation services, integrated with blockchain features for staking and wallet connectivity.
-
Ride Sharing:
- Real-time ride searching and matching.
- Interactive maps for route visualization (
react-native-maps,expo-location). - Real-time ride status updates via WebSocket (
socket.io).
-
Blockchain Integration:
- Wallet connection using Reown AppKit & Wagmi.
- Staking mechanisms via
PayTakStake.sol. - Smart contract interaction using
viem.
-
User Interface:
- Modern, responsive mobile UI built with React Native & Expo.
- Styled with NativeWind (Tailwind CSS) for a sleek look.
-
Backend:
- Robust Node.js & Express server.
- Prisma ORM for database management.
- Firebase integration for extended services.
- Real-time event handling with Socket.io.
- Framework: Expo (React Native)
- Language: TypeScript
- Styling: NativeWind (Tailwind CSS)
- Maps: React Native Maps
- Web3: Reown AppKit, Wagmi, Viem
- State Management & Data Fetching: React Query
- Routing: Expo Router
- Framework: Express.js
- Language: TypeScript
- Database ORM: Prisma
- Real-time: Socket.io
- Utilities: Firebase Admin, Multer, Axios
- Language: Solidity
- Contract:
PayTakStake.sol
It is a monorepo setup leveraging NPM workspaces:
PayTak-App/
├── back-end/ # Express.js backend application
├── front-end/ # Expo React Native mobile application
├── smart-contracts/ # Solidity smart contracts
└── package.json # Root configuration and scripts
- Node.js (Latest LTS recommended)
- npm
- Expo Go app on your mobile device or an emulator (Android Studio / Xcode).
-
Clone the repository:
git clone <repository-url> cd PayTak-App
-
Install dependencies: The project uses workspaces, so you can install all dependencies from the root:
npm install
Note: This runs
npm install --prefix front-end && npm install --prefix back-end.
Ensure you have your environment variables set up for the backend (usually in back-end/.env), specifically the DATABASE_URL.
-
Generate Prisma Client:
npm run prisma:generate
-
Push Schema to Database:
npm run prisma:push
The root package.json provides convenience scripts to run both ends of the application.
-
Start the Backend:
npm run back
This runs
npm run devin theback-enddirectory. -
Start the Frontend:
npm run front
This runs
expo startin thefront-enddirectory.
| Command | Description |
|---|---|
npm run install:all |
Installs dependencies for both frontend and backend. |
npm run front |
Starts the Expo frontend. |
npm run back |
Starts the Express backend in development mode. |
npm run build:frontend |
Builds the frontend application. |
npm run build:backend |
Compiles the backend TypeScript code. |
npm run prisma:ui |
Opens Prisma Studio to view database records (npm run prisma:studio). |