Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/wallet app #22

Merged
merged 67 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
36011ca
docs(projects): update project readme
yntpdotme Mar 16, 2024
fcb1296
docs(wallet-app): add project readme
yntpdotme Mar 16, 2024
ecaa91f
docs(wallet-app): add the backend readme
yntpdotme Mar 21, 2024
502401b
feat(wallet-app): initialize backend with basic structure
yntpdotme Mar 21, 2024
89d3ffe
feat(wallet-app): implement user registration with JWT
yntpdotme Mar 22, 2024
2108023
feat(wallet-app): implement user login with JWT
yntpdotme Mar 22, 2024
69ce247
feat(wallet-app): implement user logout with JWT
yntpdotme Mar 22, 2024
a6fa680
feat(wallet-app): implement authorization middleware with JWT
yntpdotme Mar 22, 2024
a4e7ee2
feat(wallet-app): implement Read and Update operations for users api …
yntpdotme Mar 22, 2024
cecace3
feat(wallet-app): implement wallet api endpoints
yntpdotme Mar 23, 2024
6a0a1c7
feat(wallet-app): implement transactions api endpoints
yntpdotme Mar 24, 2024
a6687ad
refactor(wallet-app): fix typo in deposit functionallity
yntpdotme Mar 24, 2024
bbab14c
feat(wallet-app): implement endpoint for refreshing access tokens
yntpdotme Mar 24, 2024
d6ccef9
feat(wallet-app): add avatar to user schema
yntpdotme Mar 24, 2024
e3fd5b6
chore(wallet-app): add production middlewares for enhanced backend se…
yntpdotme Mar 24, 2024
5de7ba0
chore: include .env sample for backend config
yntpdotme Mar 25, 2024
6c611ee
docs(wallet-app): update the backend readme
yntpdotme Mar 25, 2024
eacdf63
feat(wallet-app): initialize frontend with basic structure
yntpdotme Mar 26, 2024
cb4fd0d
feat(wallet-app): implement HomePage UI
yntpdotme Mar 26, 2024
98dc052
feat(wallet-app): implement SignUpPage UI
yntpdotme Mar 27, 2024
9a18b67
feat(wallet-app): implement SignInPage UI
yntpdotme Mar 27, 2024
30182dc
feat(wallet-app): implement SideBar component
yntpdotme Mar 28, 2024
007ae9a
feat(wallet-app): implement navbar
yntpdotme Mar 28, 2024
f2ff9c2
refactor(wallet-app): improve HTML semantics
yntpdotme Mar 28, 2024
70a802a
feat(wallet-app): implement light mode with theme toggler
yntpdotme Apr 6, 2024
062ecf3
feat(wallet-app): enhance navbar dropdown functionality
yntpdotme Apr 7, 2024
6575fc7
feat(wallet-app): implement DashboardPage UI
yntpdotme Apr 8, 2024
ecc6fc6
feat(wallet-app): enhance sidebar popup menu
yntpdotme Apr 9, 2024
c7c1381
style(wallet-app): enhance navbar dropdown
yntpdotme Apr 10, 2024
6034c21
feat(wallet-app): implement TransferPage UI
yntpdotme Apr 11, 2024
9a119c9
feat(wallet-app): implement ProfilePage UI
yntpdotme Apr 12, 2024
37094c8
feat(wallet-app): implement TransactionsPage UI
yntpdotme Apr 13, 2024
2618a1a
feat(wallet-app): implement redirection after signout
yntpdotme Apr 13, 2024
044ffb0
feat(wallet-app): include balance gain percentage in wallet
yntpdotme Apr 14, 2024
7410938
refactor(wallet-app): enhance user filtering strategy
yntpdotme Apr 14, 2024
c3b22be
docs(wallet-app): update the backend readme
yntpdotme Apr 14, 2024
27671fa
feat(wallet-app): implement localStorage service
yntpdotme Apr 15, 2024
13d26ad
feat(wallet-app): implement api client with auth and refresh token
yntpdotme Apr 15, 2024
9fd0e89
feat(wallet-app): implement auth service
yntpdotme Apr 16, 2024
d83f075
feat(wallet-app): implement user service
yntpdotme Apr 16, 2024
28cc4f9
feat(wallet-app): implement wallet service
yntpdotme Apr 16, 2024
f22212d
feat(wallet-app): implement transaction service
yntpdotme Apr 16, 2024
67b278d
feat(wallet-app): integrate signup functionality with backend API
yntpdotme Apr 17, 2024
19d18e4
feat(wallet-app): integrate signin functionality with backend API
yntpdotme Apr 17, 2024
8d2120a
feat(wallet-app): implement fetching balance from backend API
yntpdotme Apr 17, 2024
bafdb36
feat(wallet-app): integrate deposit functionality with backend API
yntpdotme Apr 17, 2024
edf7ebf
refactor(wallet-app): enhance clarity of routes
yntpdotme Apr 19, 2024
34a5c8a
feat(wallet-app): implement route for retrieving current user data
yntpdotme Apr 19, 2024
d4a7a5d
feat(wallet-app): implement fetching current user data from backend API
yntpdotme Apr 19, 2024
79ead68
feat(wallet-app): implement signout functionality
yntpdotme Apr 19, 2024
c684430
feat(wallet-app): implement authenticated user route access control
yntpdotme Apr 19, 2024
9d1388f
feat(wallet-app): integrate update user functionality with backend API
yntpdotme Apr 19, 2024
92a5c05
feat(wallet-app): add pagination to efficienty retrive users
yntpdotme Apr 20, 2024
b179fff
feat(wallet-app): add pagination to efficienty retrive transactions
yntpdotme Apr 20, 2024
f97f7ee
refactor(wallet-app): improve utils imports
yntpdotme Apr 20, 2024
e18eae6
feat(wallet-app): implement fetching transactions from backend API
yntpdotme Apr 20, 2024
870635e
feat(wallet-app): implement fetching users from backend API
yntpdotme Apr 20, 2024
b88a65e
refactor(wallet-app): improve hooks import
yntpdotme Apr 20, 2024
a63b96d
reafor(wallet-app): restructure fetching tranctions logic
yntpdotme Apr 20, 2024
ae50d38
fix(wallet-app): properly handle response data after token refresh
yntpdotme Apr 20, 2024
e51bd97
feat(wallet-app): integrate transfer funds functionality with backend…
yntpdotme Apr 21, 2024
d3d38e2
feat(wallet-app): integrate toast notifications for deposit and trans…
yntpdotme Apr 21, 2024
243b563
feat(wallet-app): implement guest sign-in
yntpdotme Apr 21, 2024
0b1da65
refactor(wallet-app): minor refinements
yntpdotme Apr 21, 2024
3871087
refactor(wallet-app): rename logout endpoint to signout for consistency
yntpdotme Apr 21, 2024
c8d739d
docs(wallet-app): update the fronend readme
yntpdotme Apr 21, 2024
64d803d
docs(wallet-app): update the project readme
yntpdotme Apr 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions 0-1/projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<br>

- ### [Week 5 : Basic Todo App (MERN)](./basic-todo-app/README.md)

- ### [Week 8 : Basic Wallet App (MERN + Tailwind)](./basic-wallet-app/README.md)
</br></br>

## Contributing
Expand Down
2 changes: 1 addition & 1 deletion 0-1/projects/basic-todo-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ To-Do App created during Week-5 of 100xDevs Cohort by Harkirat Singh.
2. **Navigate to the project directory:**

```bash
cd 100xdevs-full-stack-mastery/0-1/projects/basic-to-do-app/
cd 100xdevs-full-stack-mastery/0-1/projects/basic-todo-app/
```

3. **Setup Backend:**
Expand Down
188 changes: 188 additions & 0 deletions 0-1/projects/basic-wallet-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
<h1 align="center">Basic Wallet App</h1>

<p align="center">
A MERN project using Tailwind-CSS for practicing the tech-stack.
</p>

<p align=center>
<img width = "700px" alt="Jio Network blocking the view? Network switch reveals the magic!" src="./assets/tech-stack.png">
<p>

<div align= "center">

[![Twitter Badge](https://img.shields.io/badge/-@KadlagAkash-1ca0f1?style=flat&labelColor=1ca0f1&logo=twitter&logoColor=white&link=https://twitter.com/KadlagAkash)](https://twitter.com/KadlagAkash) &nbsp; [![Linkedin Badge](https://img.shields.io/badge/-KadlagAkash-0e76a8?style=flat&labelColor=0e76a8&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/kadlagakash/) &nbsp; [![Mail Badge](https://img.shields.io/badge/-akashkadlag14-c0392b?style=flat&labelColor=c0392b&logo=gmail&logoColor=white)](mailto:akashkadlag14@gmail.com) &nbsp; [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)&nbsp; [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)

</div>

<h2 align="center">

[🗂️&nbsp; Frontend](./client/README.md)&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;[Backend &nbsp;📂](./server/README.md)

</h2>
<br>

<p align="center">
<a href="#introduction"><strong>Introduction</strong></a>
·&nbsp;<a href="#features"><strong>Features</strong></a>
·&nbsp;<a href="#tech-stack"><strong>Tech Stack</strong></a>
·&nbsp;<a href="#local-development"><strong>Development Setup</strong></a>
</p>
<br>

## <a name="introduction">❄️&nbsp; Introduction</a>

Wallet App created during Week-8 of 100xDevs Cohort by Harkirat Singh.

<p align=center>
<img width = "650px" alt="Jio Network blocking the view? Network switch reveals the magic!" src="./assets/wallet-app.png">
<p>
<br>

## <a name="features">🔋&nbsp; Features</a>

- **Organized File and Folder Structure**: Maintain a well-organized file and folder structure for easy navigation and management.

- **Intuitive UI**: Well-organized and intuitive user interface design for a smooth user experience.

- **Server Side State Management**: Leveraged React Query for efficient data fetching and caching.

- **Client Side States Management**: Recoil for managing global state at client side.

- **Custom Hooks**: Efficient data management with a custom hooks.

- **Schema Validation**: Enforced schema validation on both frontend and backend for enhanced data integrity using zod.

- **Secure Authentication**: Robust authentication using JWT tokens.

- **Security Measures**: Implemented rate limiting and refereshing tokens.

- **Documentation**: For clarity & a local development setup guide.

- **Fully Responsive Design**: Utilize Tailwind CSS utilities for great UX across different screen sizes.

- **Dark and Light Mode**: Seamlessly switch between dark and light themes for personalized visual preferences.
<br><br>

## <a name="tech-stack">⚙️&nbsp; Tech Stack</a>

- [MongoDB](https://www.mongodb.com/) – NoSQL database
- [Express](https://expressjs.com/) – Web application framework
- [React](https://react.dev/) – library for building UI
- [Node.js](https://nodejs.org/) – JavaScript runtime
- [Tailwind CSS](https://tailwindcss.com/) – utility-first CSS framework
- [Recoil](https://recoiljs.org/) – library for state management
- [Tanstack Query](https://tanstack.com/query/latest) – library for asynchronous state management
- [Mongoose](https://mongoosejs.com/) – MongoDB object modeling
- [RESTful API](https://restfulapi.net/) – API design principles
- [Git](https://git-scm.com/) – versioning
- [Vite](https://vitejs.dev/) – building
<br><br>

## <a name="local-development"> 🖥️&nbsp;&nbsp; Local Development</a>

0. **Prerequisites** <br>
Make sure you have the following installed on your machine:

- [Git](https://git-scm.com/)
- [Node.js](https://nodejs.org/en)
- [npm](https://www.npmjs.com/) (Node Package Manager)

1. **Clone the repository:**

```bash
git clone https://github.com/KadlagAkash/100xdevs-full-stack-mastery.git
```

2. **Navigate to the project directory:**

```bash
cd 100xdevs-full-stack-mastery/0-1/projects/basic-wallet-app/
```

3. **Setup Backend:**

- **Navigate to the Backend Codebase:**

```bash
cd server/
```

- **Install dependencies:**

```bash
npm install
```

- **Add Environment Variables:**

Create .env file in the root folder and copy paste the content of .env.sample.

```bash
cp .env.sample .env
```

If required, add necessary credentials.

- **Start the Server:**

```bash
npm start
```

- **Explore the API:**

Access the project APIs at the specified endpoints using [API Docs](https://documenter.getpostman.com/view/31850881/2sA3Bn7srM).

4. **Setup Frontend:**

- **Navigate to the Frontent Codebase:**

```bash
cd client/
```

- **Install dependencies:**

```bash
npm install
```

- **Add Environment Variables:**

Create .env file in the root folder and copy paste the content of .env.sample.

```bash
cp .env.sample .env
```

If required, add necessary credentials.

- **Start the frontend app:**

```bash
npm run dev
```

- **Start the backend server:**

```bash
cd ../server
npm start
```

- **Open app in browser:**

Visit [https://localhost:5173](https://localhost:5173) to access frontent.

<br>

## 🤝&nbsp;&nbsp;Contributing

Contributions are always welcome!

See [CONTRIBUTING.md](../../../CONTRIBUTING.md) for ways to get started.
</br></br>

## 🪪&nbsp;&nbsp; Licensing Information

- It is licensed under the [MIT License](./LICENSE). Feel free to learn, add upon, and share!
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions 0-1/projects/basic-wallet-app/client/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_BASE_URL=http://localhost:3000/api/v1/
22 changes: 22 additions & 0 deletions 0-1/projects/basic-wallet-app/client/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
root: true,
env: {browser: true, es2020: true},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: {ecmaVersion: 'latest', sourceType: 'module'},
settings: {react: {version: '18.2'}},
plugins: ['react-refresh'],
rules: {
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{allowConstantExport: true},
],
'react/prop-types': 0,
},
};
24 changes: 24 additions & 0 deletions 0-1/projects/basic-wallet-app/client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
9 changes: 9 additions & 0 deletions 0-1/projects/basic-wallet-app/client/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"tabWidth": 2,
"singleQuote": true,
"printWidth": 80,
"bracketSpacing": false,
"arrowParens": "avoid",
"plugins": ["prettier-plugin-tailwindcss"],
"tailwindConfig": "./tailwind.config.js"
}
81 changes: 81 additions & 0 deletions 0-1/projects/basic-wallet-app/client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<h3 align="center">

[🗂️&nbsp; Source Code](../client/)

</h3>
<br>

<h1 align="center">Wallet Application Frontend</h1>

- This frontend is built to interact with the Wallet Application Backend APIs.

- It provides a user interface to manage, organize and transfer your funds effectively.

<br>

<h2 align="center">User Interface</h2>

<p align=center>
<img alt="Jio Network blocking the view? Network switch reveals the magic!" src="./src/assets/ui-1.png">
<p>
<br>

<p align=center>
<img alt="Jio Network blocking the view? Network switch reveals the magic!" src="./src/assets/ui-1-light.png">
<p>
<br>

<p align=center>
<img alt="Jio Network blocking the view? Network switch reveals the magic!" src="./src/assets/ui-2.png">
<p>
<br>


<p align=center>
<img alt="Jio Network blocking the view? Network switch reveals the magic!" src="./src/assets/ui-2-light.png">
<p>

<h2 align="center">🖥️&nbsp;&nbsp; Local Development</h2>

1. **Navigate to the Frontent Codebase:**

```bash
cd client/
```

2. **Install dependencies:**

```bash
npm install
```

3. **Add Environment Variables:**

Create .env file in the root folder and copy paste the content of .env.sample.

```bash
cp .env.sample .env
```

If required, add necessary credentials.

4. **Start the frontend app:**

```bash
npm run dev
```

5. **Start the backend server:**

```bash
cd ../server
npm start
```

6. **Open app in browser:**

Visit [https://localhost:5173](https://localhost:5173) to access frontent.

<br>

Feel free to explore frontend implementation and run it locally to verify it's correctness. Happy coding!
13 changes: 13 additions & 0 deletions 0-1/projects/basic-wallet-app/client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./src/assets/wallet.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Basic Wallet App</title>
</head>
<body class="bg-background text-foreground">
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading
Loading