A secure and scalable digital wallet built using FastAPI, designed for users and developers who want to store, send, and manage cryptocurrency transactions with robust authentication and backend logic.
It’s aimed at developers learning blockchain integrations or anyone looking to understand how crypto wallet infrastructures work — from user management to token-based authentication and transaction handling.
PROJECT OVERVIEW
The Crypto Wallet is a secure backend application built with FastAPI that enables users to create wallets, manage balances, and perform cryptocurrency transactions. It implements JWT-based authentication, role-based route protection, and password hashing to ensure data security. The project follows a modular backend architecture, incorporates token verification, and demonstrates best practices for secure transaction processing.
Ideal for developers and learners exploring blockchain integration, it provides hands-on experience with authentication, hashing, API development, and secure backend design.
INSTALLING AND RUNNING THE PROJECT
-
Clone the repository to your local machine:
git clone https://github.com//crypto-wallet.git
cd crypto-wallet
-
Create a virtual environment to isolate dependencies:
python -m venv venv
- Activate it:
- On macOS/Linux: source venv/bin/activate
- On Windows: venv\Scripts\activate
- Activate it:
-
Install project dependencies:
pip install -r requirements.txt
-
Set up environment variables in a .env file with the necessary keys like SECRET_KEY, ALGORITHM, ACCESS_TOKEN_EXPIRE_MINUTES, and DATABASE_URL.
-
Run the application using Uvicorn:
uvicorn app.main:app --reload
-
The application will be available at http://127.0.0.1:8000 and your APIs can now be tested.
HOW TO USE OF PROJECT
- Register a new user via the /register endpoint by providing a username and password.
- Log in using the /login endpoint to receive a JWT access token for authentication.
- Access wallet information via the /wallet endpoint to check your current balance.
- Send or receive cryptocurrency transactions using the /transaction endpoint. Include the recipient, amount, and authentication token in the request.
- Fetch your profile information using /users/me, which is a protected route requiring a valid JWT token.
- All requests to protected endpoints must include the JWT token in the Authorization header as Bearer .
- You can interact with the API using tools like Postman, Insomnia, or curl, or integrate it into a frontend client.
FEATURES
- JWT-based authentication
- Wallet creation & balance management
- Transaction sending & tracking
- Password hashing & secure data storage
- Modular backend architecture
TECH STACK
- Backend: FastAPI
- Database: SQLite / PostgreSQL
- Authentication: JWT
- Deployment: Render
- Language: Python 3.10+
BADGES
AUTHOR
ParthAggarwal16
ACKNOWLEDGE
- FastAPI documentation
- Shields.io
- readme.so templates