feat: architecture refactor — core layer, spreadsheet engine, envelope bidding, tests
CI / quality (push) Waiting to run

- Add src/core/ (config, errors, events, http, observability, storage, query)
- Add src/Spreadsheet/ engine with native POI backend and Excel bridge
- Add Envelope C spreadsheet flow and tender bidding envelope modules
- Consolidate components into src/components/, remove legacy Component/ and Hooks/
- Add registration state/validation, auth session guard, profile edit modules
- Add unit tests across axios, redux, bidding, registration, encryption, core
- Add CI workflow, docs (architecture, audit, DSC API spec), keystore example
- Remove tracked keystore binary; ignore scripts.zip

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Abin Toppo
2026-07-16 10:20:22 +05:30
co-authored by Claude Fable 5
parent 9acec328a7
commit 1d7646d938
217 changed files with 11068 additions and 6855 deletions
+117 -65
View File
@@ -1,97 +1,149 @@
This is a new [**React Native**](http://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](http://github.com/react-native-community/cli).
# ProcureLinc — Mobile App
# Getting Started
ProcureLinc is a React Native mobile application for an **e-procurement platform** that lets registered contractors take part in **e-auctions** and **e-tenders** from their phone. It covers the full journey: contractor onboarding with eKYC, browsing live auctions/tenders, purchasing/EMD payments, document submission, and secure bidding.
> **Note**: Make sure you have completed the [Set Up Your Environment](http://reactnative.dev/docs/set-up-your-environment) guide before proceeding.
- **Platform:** Android & iOS (React Native 0.79, React 19)
- **App ID:** `com.procure`
- **Backend:** REST + WebSocket APIs (base URL configured in [src/Services/ApiCall/ApiUrls.tsx](src/Services/ApiCall/ApiUrls.tsx))
## Step 1: Start Metro
---
First, you will need to run **Metro**, the JavaScript build tool for React Native.
## Features
To start the Metro dev server, run the following command from the root of your React Native project:
- **Contractor registration** — multi-stage onboarding (Stage 1–3) including partnership details.
- **eKYC verification** — Organization PAN, Aadhaar (OTP), and GST verification flows; KYC web view.
- **Authentication & security** — login, reset password, two-factor auth, **device binding**, **DSC (Digital Signature Certificate) binding**, and request/response encryption.
- **e-Auctions** — live auction listings, forward & reverse auctions, item-wise & auction-wise EMD documents, technical document templates, purchase + transaction status.
- **e-Tenders** — live tender listings, tender details, proceed-to-bid, and **Envelope A / B / C** plus **QCBS / LCS** submission with file uploads.
- **Real-time bidding** — STOMP over SockJS WebSocket updates.
- **Dashboard & profile** — auction/tender dashboard counts, contractor profile view/edit, purchased tenders & auctions.
- **Smooth UX** — native-stack screen transitions, animated custom bottom tab bar, Lottie animations, and theming (light/dark via `useTheme`).
---
## Tech Stack
| Area | Library |
|------|---------|
| Framework | React Native 0.79, React 19 |
| Navigation | `@react-navigation/native`, `native-stack`, `bottom-tabs`, `drawer` |
| State | Redux Toolkit, `react-redux`, `redux-persist` |
| Data fetching | TanStack React Query, Axios |
| Forms & validation | Formik, Yup |
| Real-time | `@stomp/stompjs`, `sockjs-client` |
| Animation / UI | Reanimated, Gesture Handler, Lottie, Lucide icons, SVG, Linear Gradient |
| Security | `crypto-js`, `jsencrypt`, `react-native-device-info` |
| Documents | `exceljs`, `xlsx`, `react-native-blob-util`, `react-native-fs`, document picker |
| Device | Permissions, Geolocation, Haptic Feedback, WebView |
---
## Project Structure
```
src/
├── Axios/ # Axios instance & interceptors
├── Component/ # Shared components
├── components/ # App-level components (e.g. AppStatusBar)
├── Constant/ # Colors, NavigationString, static config
├── Helper/ # Helper utilities
├── Hooks/ # Custom hooks (e.g. useTheme)
├── Images/ # Image assets
├── Navigation/ # MainStack, Bottom tabs, Drawer, NavigationService
├── Permission/ # Runtime permission handling
├── Redux/ # Store, slices, persistence
├── Screens/ # Feature screens (Auction, Tender, Bidding, Login, etc.)
├── Services/ # API calls & endpoint URLs
├── Styles/ # Shared styles
├── Utils/ # Utilities (encryption, formatting, etc.)
├── api/ # API helpers
├── lottie/ # Lottie animation files
├── socket/ # WebSocket (STOMP/SockJS) setup
└── theme/ # Typography & theme tokens
```
Navigation entry points:
- [App.tsx](App.tsx) → [src/Navigation/Routes.jsx](src/Navigation/Routes.jsx) → [src/Navigation/MainStack.jsx](src/Navigation/MainStack.jsx)
- Bottom tabs (Home / Auction / Tender / Profile): [src/Navigation/Bottom.tsx](src/Navigation/Bottom.tsx)
---
## Getting Started
> **Note:** Complete the [React Native environment setup](https://reactnative.dev/docs/set-up-your-environment) first.
### Prerequisites
- Node.js **>= 18**
- JDK 17, Android SDK / Android Studio (for Android)
- Xcode + CocoaPods (for iOS, macOS only)
### 1. Install dependencies
```sh
npm install
```
### 2. Configure the backend URL
Set the active `BASE_URL` in [src/Services/ApiCall/ApiUrls.tsx](src/Services/ApiCall/ApiUrls.tsx). The default points to the demo environment:
```ts
const BASE_URL = `https://eproc.godemo.in/`;
```
### 3. Start Metro
```sh
# Using npm
npm start
# OR using Yarn
yarn start
```
## Step 2: Build and run your app
### 4. Run the app
With Metro running, open a new terminal window/pane from the root of your React Native project, and use one of the following commands to build and run your Android or iOS app:
### Android
**Android**
```sh
# Using npm
npm run android
# OR using Yarn
yarn android
```
### iOS
For iOS, remember to install CocoaPods dependencies (this only needs to be run on first clone or after updating native deps).
The first time you create a new project, run the Ruby bundler to install CocoaPods itself:
```sh
bundle install
```
Then, and every time you update your native dependencies, run:
**iOS** (first run / after native dependency changes, install pods):
```sh
bundle install # first time only
bundle exec pod install
```
For more information, please visit [CocoaPods Getting Started guide](http://guides.cocoapods.org/using/getting-started.html).
```sh
# Using npm
npm run ios
# OR using Yarn
yarn ios
```
If everything is set up correctly, you should see your new app running in the Android Emulator, iOS Simulator, or your connected device.
---
This is one way to run your app — you can also build it directly from Android Studio or Xcode.
## Available Scripts
## Step 3: Modify your app
| Script | Description |
|--------|-------------|
| `npm start` | Start the Metro dev server |
| `npm run android` | Build & run on Android |
| `npm run ios` | Build & run on iOS |
| `npm run lint` | Run ESLint |
| `npm test` | Run Jest tests |
| `npm run create:users` | Run the user-seeding script (`scripts/create-users.js`) |
Now that you have successfully run the app, let's make changes!
> If a transition or native change doesn't appear, restart Metro with a clean cache: `npx react-native start --reset-cache`.
Open `App.tsx` in your text editor of choice and make some changes. When you save, your app will automatically update and reflect these changes — this is powered by [Fast Refresh](http://reactnative.dev/docs/fast-refresh).
---
When you want to forcefully reload, for example to reset the state of your app, you can perform a full reload:
## Repository
- **Android**: Press the <kbd>R</kbd> key twice or select **"Reload"** from the **Dev Menu**, accessed via <kbd>Ctrl</kbd> + <kbd>M</kbd> (Windows/Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (macOS).
- **iOS**: Press <kbd>R</kbd> in iOS Simulator.
This project is hosted on the internal Git server:
## Congratulations! :tada:
```
http://git.lincpay/EProcurement/ProcureLinc-Mobile-App.git
```
You've successfully run and modified your React Native App. :partying_face:
---
### Now what?
## Troubleshooting
- If you want to add this new React Native code to an existing application, check out the [Integration guide](http://reactnative.dev/docs/integration-with-existing-apps).
- If you're curious to learn more about React Native, check out the [docs](http://reactnative.dev/docs/getting-started).
# Troubleshooting
If you're having issues getting the above steps to work, see the [Troubleshooting](http://reactnative.dev/docs/troubleshooting) page.
# Learn More
To learn more about React Native, take a look at the following resources:
- [React Native Website](http://reactnative.dev) - learn more about React Native.
- [Getting Started](http://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.
- [Learn the Basics](http://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.
- [Blog](http://reactnative.dev/blog) - read the latest official React Native **Blog** posts.
- [`@facebook/react-native`](http://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.
- **Metro stale cache** — `npx react-native start --reset-cache`.
- **Android build issues** — `cd android && ./gradlew clean`, then rebuild.
- **iOS pods out of date** — re-run `bundle exec pod install`.
- General help: [React Native Troubleshooting](https://reactnative.dev/docs/troubleshooting).