Skip to content

abdi7d/Credit-Management-System

Repository files navigation

ShopCredit

A React Native + Expo customer ledger app for small shops to track customer credit, payments, balances, and simple reporting.

This project currently runs with a local in-memory data layer (platform-hooks.js) so it can work immediately without external backend services.

Highlights

  • Login and registration flow with role-based access
  • Shop owner and customer modes
  • Customer list with balance overview
  • Credit and payment transaction logging
  • Transaction history and reporting screens
  • Mobile + web support through Expo

Tech Stack

  • Expo SDK 53
  • React Native
  • React Navigation (stack + bottom tabs)
  • TypeScript support enabled in the project

Project Structure

  • App.tsx: app entry point
  • ShopCredit.tsx: main app UI and screen logic
  • platform-hooks.js: local query/mutation hooks with in-memory store
  • app.json: Expo app configuration
  • babel.config.js: Babel configuration

Prerequisites

  • Node.js 18+ (Node.js 20 LTS recommended)
  • npm 9+
  • Expo Go app (optional, for physical device testing)

Installation

npm install

Run The App

Start Expo development server:

npm start

Then choose a platform from the terminal:

  • w for web
  • a for Android emulator/device
  • i for iOS simulator (macOS only)

Direct platform commands are also available:

npm run web
npm run android
npm run ios

Demo Login Credentials

These seeded users are defined in platform-hooks.js:

  • Shop Owner
    • Username: owner
    • Password: owner123
  • Customer
    • Username: customer
    • Password: customer123

Data Behavior (Important)

The current data layer is in-memory only.

  • Data is reset whenever the app reloads or restarts.
  • This is ideal for demos and local practice.
  • For production use, replace platform-hooks.js with a persistent backend (API + database).

Available Scripts

  • npm start: start Expo dev server
  • npm run web: run web target
  • npm run android: run Android target
  • npm run ios: run iOS target (macOS)

Troubleshooting

1) Metro or dependency errors

Try:

npm install
npx expo install

2) Web runtime package missing

If Expo reports web runtime dependency issues:

npx expo install @expo/metro-runtime

3) Port already in use

Run Expo on another port:

npx expo start --web --port 8082

4) Clean reinstall

rm -rf node_modules package-lock.json
npm install
npm start

On Windows PowerShell:

Remove-Item -Recurse -Force node_modules
Remove-Item -Force package-lock.json
npm install
npm start

Next Improvements

  • Persist data with SQLite, Firebase, Supabase, or a custom backend API
  • Add form validation and stronger auth security
  • Add exportable reports (CSV/PDF)
  • Add unit and integration tests
  • Add CI checks for lint/test/build

License

About

Credit Management System for Local Shops & Mini-Markets – A mobile application that helps shop owners track customer credit, manage repayments, send payment reminders, and generate financial reports efficiently.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors