Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

333 Commits

Folders and files

Repository files navigation

PayTak App

PayTak is a comprehensive decentralized application (dApp) designed for ride-sharing and transportation services, integrated with blockchain features for staking and wallet connectivity.

🚀 Features

  • 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.

🛠 Tech Stack

Frontend

  • 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

Backend

  • Framework: Express.js
  • Language: TypeScript
  • Database ORM: Prisma
  • Real-time: Socket.io
  • Utilities: Firebase Admin, Multer, Axios

Smart Contracts

  • Language: Solidity
  • Contract: PayTakStake.sol

📂 Project Structure

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

🏁 Getting Started

Prerequisites

  • Node.js (Latest LTS recommended)
  • npm
  • Expo Go app on your mobile device or an emulator (Android Studio / Xcode).

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd PayTak-App
  2. 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.

Database Setup

Ensure you have your environment variables set up for the backend (usually in back-end/.env), specifically the DATABASE_URL.

  1. Generate Prisma Client:

    npm run prisma:generate
  2. Push Schema to Database:

    npm run prisma:push

Running the Application

The root package.json provides convenience scripts to run both ends of the application.

  1. Start the Backend:

    npm run back

    This runs npm run dev in the back-end directory.

  2. Start the Frontend:

    npm run front

    This runs expo start in the front-end directory.

📜 Scripts

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).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages