Recommend this page to a friend! |
Download .zip |
Info | View files (150) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2022-01-20 (8 days ago) | Not yet rated by the users | Total: 28 This week: 14 | All time: 10,413 This week: 10 |
Version | License | PHP version | Categories | |||
wallet-app 1.0.0 | GNU Lesser Genera... | 5 | PHP 5, Web services, Finances |
Description | Author | |
This package provides an application to manage a wallet by calling an API. |
this app created with * Laravel 8 * React <typescript> * tailwindCss
all files (Classes, methods) are documented well, so you can open any file and read comments if you want to know how things going.
### Requriments: * composer * Node >=v14.18.1 <=v16.13.1 (v17.2.0 cause errors) * PHP v7.4.0+ * Database :
* Mysql v5.7+
* PostgreSQL 9.6+
* SQL Server 2017+
to run this app on your computer please follow steps,
run `php artisan db:seed` to insert some data into database
# create user with admin persmissions
{
name: Admin,
email: admin@admin.com,
passowrd: admin123
}
# create init payment method
first thing you want to do is (login as admin and create payment method) if you register as a user , you cant create any transactions if theres no payment methods.
DB_CONNECTION={database_driver} #(by default its mysql)
DB_HOST={database_host}
DB_PORT=={database_port} # by default (3306)
DB_DATABASE={database_name}
DB_USERNAME={database_username}
DB_PASSWORD={database_user_password}
in /server/.env file
# set app url
APP_URL={API_URL}
# set setion limit
JWT_TTL=120 # for 2 hours
This version of the application does not specify the allowed currencies, due to time constraints only.
the main idea its create table currencies
related with payments
table
when user creating transaction just check if the currency he choose is allowd in selected payment method or not, thats it
wallet management system that has two types of users: admin and client.
Admin section:
? Admin can create a new payment method that will be offered to the clients, the clients can
use the predefined payment methods to deposit or withdrawal to their wallet,
payment method interface includes the following:
Payment method name
, payment method image
, allowed currencies
, min deposit
, `max
deposit,
min withdrawaland
max withdrawal`.
? Admin can approve or reject the transaction (deposit or withdrawal), created by the user.
? Admin can see all users, and he has the power to block any user.
? Admin can show the total transactions with a chart and filtration.
Client section: ? Client can make any transaction (deposit or withdrawal), and wallet will be reflected after admins approval. ? The client can see the wallet balance and he can see the transactions he requested with the status.
when we have only 2 types of users (admin/user) I just make it simple, so I created very simple permission roles its column called (is_admin) in users table.
I know its basic but it does the trick here
Files | / | client |
File | Role | Description | ||
---|---|---|---|---|
public (6 files) | ||||
src (4 files, 2 directories) | ||||
craco.config.js | Data | Auxiliary data | ||
package-lock.json | Data | Auxiliary data | ||
package.json | Data | Auxiliary data | ||
README.md | Doc. | Documentation | ||
tailwind.config.js | Data | Auxiliary data | ||
tsconfig.json | Data | Auxiliary data |
Files | / | client | / | public |
File | Role | Description |
---|---|---|
favicon.ico | Data | Auxiliary data |
index.html | Doc. | Documentation |
logo192.png | Icon | Icon image |
logo512.png | Data | Auxiliary data |
manifest.json | Data | Auxiliary data |
robots.txt | Doc. | Documentation |
Files | / | client | / | src |
File | Role | Description | ||
---|---|---|---|---|
app (1 file, 4 directories) | ||||
features (2 directories) | ||||
index.tsx | Data | Auxiliary data | ||
react-app-env.d.ts | Data | Auxiliary data | ||
reportWebVitals.ts | Data | Auxiliary data | ||
setupTests.ts | Data | Auxiliary data |
Files | / | client | / | src | / | app |
File | Role | Description | ||
---|---|---|---|---|
api (1 file) | ||||
layout (2 files) | ||||
models (5 files) | ||||
stores (7 files) | ||||
helpers.ts | Data | Auxiliary data |
Files | / | client | / | src | / | app | / | models |
File | Role | Description |
---|---|---|
ErrorResponse.ts | Data | Auxiliary data |
Payment.ts | Data | Auxiliary data |
Transaction.ts | Data | Auxiliary data |
User.ts | Data | Auxiliary data |
Wallet.ts | Data | Auxiliary data |
Files | / | client | / | src | / | app | / | stores |
File | Role | Description |
---|---|---|
CommonStore.ts | Data | Auxiliary data |
ErrorsStore.ts | Data | Auxiliary data |
ModalStore.ts | Data | Auxiliary data |
PaymentStore.ts | Data | Auxiliary data |
store.ts | Data | Auxiliary data |
TransactionStore.ts | Data | Auxiliary data |
UserStore.ts | Data | Auxiliary data |
Files | / | client | / | src | / | features |
File | Role | Description | ||
---|---|---|---|---|
components (4 files, 1 directory) | ||||
pages (4 files, 2 directories) |
Files | / | client | / | src | / | features | / | components |
File | Role | Description | ||
---|---|---|---|---|
Routes (4 files) | ||||
Chart.tsx | Data | Auxiliary data | ||
ErrorSection.tsx | Data | Auxiliary data | ||
ModalContainer.tsx | Data | Auxiliary data | ||
Nav.tsx | Data | Auxiliary data |
Files | / | client | / | src | / | features | / | components | / | Routes |
File | Role | Description |
---|---|---|
BrowserRouter.tsx | Data | Auxiliary data |
GuestRoute.tsx | Data | Auxiliary data |
PrivateRoute.tsx | Data | Auxiliary data |
UserRoute.tsx | Data | Auxiliary data |
Files | / | client | / | src | / | features | / | pages |
File | Role | Description | ||
---|---|---|---|---|
dashboard (2 files, 3 directories) | ||||
user (3 files) | ||||
Dashboard.tsx | Data | Auxiliary data | ||
LoginPage.tsx | Data | Auxiliary data | ||
NotFound.tsx | Data | Auxiliary data | ||
Register.tsx | Data | Auxiliary data |
Files | / | client | / | src | / | features | / | pages | / | dashboard |
File | Role | Description | ||
---|---|---|---|---|
Payments (2 files) | ||||
Transaction (1 file) | ||||
Users (1 file) | ||||
Home.tsx | Data | Auxiliary data | ||
Menu.tsx | Data | Auxiliary data |
Files | / | client | / | src | / | features | / | pages | / | dashboard | / | Payments |
File | Role | Description |
---|---|---|
ListPayments.tsx | Data | Auxiliary data |
ManagePayment.tsx | Data | Auxiliary data |
Files | / | client | / | src | / | features | / | pages | / | dashboard | / | Transaction |
File | Role | Description |
---|---|---|
ListTransactions.tsx | Data | Auxiliary data |
Files | / | client | / | src | / | features | / | pages | / | dashboard | / | Users |
File | Role | Description |
---|---|---|
ListUsers.tsx | Data | Auxiliary data |
Files | / | client | / | src | / | features | / | pages | / | user |
File | Role | Description |
---|---|---|
CreateTransaction.tsx | Data | Auxiliary data |
Profile.tsx | Data | Auxiliary data |
ProfileHistory.tsx | Data | Auxiliary data |
Files | / | server |
File | Role | Description | ||
---|---|---|---|---|
app (6 directories) | ||||
bootstrap (1 file) | ||||
config (17 files) | ||||
database (3 directories) | ||||
public (4 files) | ||||
resources (3 directories) | ||||
routes (4 files) | ||||
tests (2 files, 2 directories) | ||||
.editorconfig | Data | Auxiliary data | ||
.env.example | Data | Auxiliary data | ||
.styleci.yml | Data | Auxiliary data | ||
artisan | Class | Class source | ||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
package.json | Data | Auxiliary data | ||
phpunit.xml | Data | Auxiliary data | ||
README.md | Doc. | Documentation | ||
server.php | Aux. | Auxiliary script | ||
webpack.mix.js | Data | Auxiliary data |
Files | / | server | / | app |
File | Role | Description | ||
---|---|---|---|---|
Console (1 file) | ||||
Exceptions (1 file) | ||||
Http (1 file, 2 directories) | ||||
Models (4 files) | ||||
Providers (5 files) | ||||
Transformers (4 files) |
Files | / | server | / | app | / | Http |
File | Role | Description | ||
---|---|---|---|---|
Controllers (3 files, 2 directories) | ||||
Middleware (9 files) | ||||
Kernel.php | Class | Class source |
Files | / | server | / | app | / | Http | / | Controllers |
File | Role | Description | ||
---|---|---|---|---|
Auth (3 files) | ||||
Wallet (2 files) | ||||
Controller.php | Class | Class source | ||
PaymentController.php | Class | Class source | ||
UserController.php | Class | Class source |
Files | / | server | / | app | / | Http | / | Controllers | / | Auth |
File | Role | Description |
---|---|---|
LoginController.php | Class | Class source |
LogoutController.php | Class | Class source |
RegisterController.php | Class | Class source |
Files | / | server | / | app | / | Http | / | Controllers | / | Wallet |
File | Role | Description |
---|---|---|
TransactionsController.php | Class | Class source |
WalletController.php | Class | Class source |
Files | / | server | / | app | / | Http | / | Middleware |
File | Role | Description |
---|---|---|
Authenticate.php | Class | Class source |
EncryptCookies.php | Class | Class source |
OnlyAdmin.php | Class | Class source |
PreventRequestsDuringMaintenance.php | Class | Class source |
RedirectIfAuthenticated.php | Class | Class source |
TrimStrings.php | Class | Class source |
TrustHosts.php | Class | Class source |
TrustProxies.php | Class | Class source |
VerifyCsrfToken.php | Class | Class source |
Files | / | server | / | app | / | Models |
File | Role | Description |
---|---|---|
Payment.php | Class | Class source |
Transaction.php | Class | Class source |
User.php | Class | Class source |
Wallet.php | Class | Class source |
Files | / | server | / | app | / | Providers |
File | Role | Description |
---|---|---|
AppServiceProvider.php | Class | Class source |
AuthServiceProvider.php | Class | Class source |
BroadcastServiceProvider.php | Class | Class source |
EventServiceProvider.php | Class | Class source |
RouteServiceProvider.php | Class | Class source |
Files | / | server | / | app | / | Transformers |
File | Role | Description |
---|---|---|
PaymentTransformer.php | Class | Class source |
TransactionsTransformer.php | Class | Class source |
UserTransformer.php | Class | Class source |
WalletTransformer.php | Class | Class source |
Files | / | server | / | config |
File | Role | Description |
---|---|---|
app.php | Class | Class source |
auth.php | Class | Class source |
broadcasting.php | Aux. | Auxiliary script |
cache.php | Aux. | Auxiliary script |
cors.php | Aux. | Auxiliary script |
database.php | Aux. | Auxiliary script |
filesystems.php | Aux. | Auxiliary script |
fractal.php | Class | Class source |
hashing.php | Aux. | Auxiliary script |
jwt.php | Class | Class source |
logging.php | Class | Class source |
mail.php | Aux. | Auxiliary script |
queue.php | Aux. | Auxiliary script |
sanctum.php | Class | Class source |
services.php | Aux. | Auxiliary script |
session.php | Aux. | Auxiliary script |
view.php | Aux. | Auxiliary script |
Files | / | server | / | database |
File | Role | Description | ||
---|---|---|---|---|
factories (1 file) | ||||
migrations (11 files) | ||||
seeders (3 files) |
Files | / | server | / | database | / | migrations |
File | Role | Description |
---|---|---|
2014_10_12_000000_create_users_table.php | Class | Class source |
2014_10_12_100000_...rd_resets_table.php | Class | Class source |
2019_08_19_000000_...iled_jobs_table.php | Class | Class source |
2019_12_14_000001_...ss_tokens_table.php | Class | Class source |
2021_12_02_174733_..._payments_table.php | Class | Class source |
2021_12_02_175751_...e_wallets_table.php | Class | Class source |
2021_12_02_180154_...nsactions_table.php | Class | Class source |
2021_12_02_231608_...ansaction_table.php | Class | Class source |
2021_12_02_234650_...urrencies_table.php | Class | Class source |
2021_12_02_234755_...ansaction_table.php | Class | Class source |
2021_12_05_041427_..._payments_table.php | Class | Class source |
Files | / | server | / | database | / | seeders |
File | Role | Description |
---|---|---|
AdminSeeder.php | Class | Class source |
DatabaseSeeder.php | Class | Class source |
PaymentSeeder.php | Class | Class source |
Files | / | server | / | public |
File | Role | Description |
---|---|---|
.htaccess | Data | Auxiliary data |
index.php | Class | Class source |
robots.txt | Doc. | Documentation |
web.config | Data | Auxiliary data |
Files | / | server | / | resources | / | js |
File | Role | Description |
---|---|---|
app.js | Data | Auxiliary data |
bootstrap.js | Data | Auxiliary data |
Files | / | server | / | resources | / | lang | / | en |
File | Role | Description |
---|---|---|
auth.php | Aux. | Auxiliary script |
pagination.php | Aux. | Auxiliary script |
passwords.php | Aux. | Auxiliary script |
validation.php | Aux. | Auxiliary script |
Files | / | server | / | routes |
File | Role | Description |
---|---|---|
api.php | Class | Class source |
channels.php | Example | Example script |
console.php | Example | Example script |
web.php | Aux. | Auxiliary script |
Files | / | server | / | tests |
File | Role | Description | ||
---|---|---|---|---|
Feature (1 file) | ||||
Unit (1 file) | ||||
CreatesApplication.php | Class | Class source | ||
TestCase.php | Class | Class source |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.