An e-rupi voucher ecosystem. A solution for corporate, government,users and merchants.
E-Rupi is a person and purpose-specific voucher. It can only be redeemed by the intended person for the intended purpose. The transaction takes place between a user's e-voucher and the merchant's bank. It is an offline process. One must make a manual requests to the bank for issuance of E-Rupi Voucher.
Keeping the essence of e-rupi voucher alive we built an online digital wallet to provide extra features on top of the offline feature.
src
-> Inside the src folder the actual code resides.
Lets take a look inside the src
folder
config
-> Connected MySQL database and entered its password.
server-config.js
-> Environment variables: PORT, SALT_ROUNDS, JWT_EXPIRY, JWT_SECRET
routes
-> V1 version of routing API in this folder. Routing of banks, merchants, transactions, users, and vouchers.
middlewares
-> Validator and authenticator for banks is here.
controllers
-> The connection setters between Routers and Services. Controllers are made for banks, merchants, transactions, users, and vouchers.
repositories
-> DB connections of banks, merchants, transactions, users, and vouchers are here.
services
-> All business logic for banks, merchants, transactions, users, and vouchers are here.
utils
->
- Helper methods: auth, error-response, success-response, Twilio here.
- Error classes here.
public
-> Contains static assets such as index.html and other public files.
src
-> The main directory where the React source code resides.
assets
-> Holds all the images used in the software
components
-> Holds the reusable components used throughout the application.
The components are:
- CenterProfile
- ContentWrapper
- LeftProfile
- Navbar
- RightProfile
- AppContext.jsx
- GenerateQR.jsx
- Lowerprofile.jsx
- LowerProfile.jsx
- OtpInput.jsx
- Popup.jsx
modals
->
- amountModal
- otpModal
- transactionModal
- departmentModal
- requestSentModel
- detailsModal
Pages
-> Holds all the pages of the application.
- Analysis
- CompanyDashboard
- Dashboard
- Home
- Login
- Merchant
- Merchant_Dashboard
- OtpVerification
- Profile
- Rewards
- Roles
- Register
- Transaction
- VoucherID
- VoucherPage
- Constants.js
styles
-> Contains CSS or styling files.
App.jsx
-> The main component that serves as the entry point for the frontend.
index.js
-> The entry point for rendering the React application.
.gitignore
-> Specifies which files and directories to ignore in version control.
package.json
-> Configuration file that contains project dependencies, scripts, and auth
Go inside the folder path and execute the following command:
npm install
In the root directory create a .env file and add the following env variables.
PORT=
ex: PORT=3000
go inside the src
folder and execute the following command: npx sequelize init
By executing the above command you will get migrations and seeders folder along with a config.json inside the config folder.
If you're setting up your development environment, then write the username of your db, password of your db and in dialect mention whatever db you are using for ex: mysql, mariadb etc
Navigate to the frontend directory: cd Frontend
Run the following command to install frontend dependencies: npm install
In the root directory create a .env file and add the following env variables
PORT=
ex: PORT=5137
If the project requires configuration, you may need to provide specific details or environment variables for both the backend and frontend.
The .env file resides here. It has the port, salt_rounds, jwt_secret, and jwt_expiry.
Open a terminal and navigate to the backend directory.
Run the following command to start the backend server:
To run the server execute : npm run dev
This command will start the backend server, which will listen for incoming API requests.
Open a new terminal window (while keeping the backend server running in the previous terminal) and navigate to the frontend directory.
Run the following command to start the frontend development server: npm run dev
- Request Vouchers
- Extend Expiry of a voucher
- Pay to Merchant
- Review Expenditure Analysis
- Review Yojana's related to the user
- Transation History
- Accept Payment
- Review Customer Analysis : See what yojana related vouchers are being redeemed
- Transaction History
- Create Voucher
- Distribute Voucher
- Analysis : Distribution analysis, Vouchers being expired without being redeemd analysis
- Vouchers redeemed transaction
- Users voucher tracking
- Create Voucher
- Distribute Voucher
- Analysis : Distribution analysis, Vouchers being expired without being redeemd analysis
- Employee Transaction History
- POST User: signup
localhost:3000/api/v1/users/signup
-
POST User: Request a voucher
User: localhost:3000/api/v1/vouchers
-
GET User: Get voucher
localhost:3000/api/v1/vouchers
- GET User: Get voucher Cop
localhost:3000/api/v1/vouchers
-
POST Merchant: SignIn
localhost:3000/api/v1/merchants/signin
- POST Merchant: create acquirer bank
localhost:3000/api/v1/merchants/addBank
- GET Merchant: Request OTP
localhost:3000/api/v1/merchants/requestOTP
- POST Merchant: Accept Payment
localhost:3000/api/v1/merchants/acceptPayment