CipherSafe is a password management service designed to securely store and manage online identities. The project includes a backend API developed with FastAPI and a frontend application offering an intuitive user interface for interacting with the service.
The backend manages user authentication, account operations, and password encryption/decryption. It's built with FastAPI and relies on PostgreSQL for data storage. Key files and dependencies include:
- Api.py: Main FastAPI application file containing API endpoints and business logic.
- .env: Configuration file storing environment variables like database credentials and JWT secret key.
- requirements.txt: File listing Python dependencies required for the backend.
The frontend provides a user-friendly interface. It's built using modern web technologies and frameworks. To run the frontend:
- Install dependencies with
npm install
. - Update IP address in
homeComponent.jsx
,SigninComponent.jsx
,SignupComponent.js
. - Start the development server with
npm run dev -- --host
.
-
Set Up Environment Variables: Create a
.env
file in the backend directory with:DB_USER=your_database_username DB_PASSWORD=your_database_password DB_HOST=your_database_host DB_PORT=your_database_port DB_NAME=your_database_name J_SECRET=your_jwt_secret_key BY_SECRET=your_base64_encoded_fernet_key
-
Install Dependencies: Run
pip install -r requirements.txt
. -
Run the Backend Server: Start the FastAPI server with:
uvicorn Api:app --reload --host 0.0.0.0
-
Navigate to the Frontend Directory.
-
Install Dependencies: Run
npm install
. -
Run the Development Server: Start the frontend development server with:
npm run dev -- --host
- Register User:
POST /register
- Login User:
POST /login
- Save Account:
POST /saveaccount
- Get Accounts:
GET /get_accounts?email=user_email
- Update Account:
PUT /update_account/{account_id}
- Delete Account:
DELETE /delete_account/{account_id}
- Decrypt Password:
POST /decrypt
- Validate Token:
POST /validateToken
The .env
file should contain:
DB_USER
: PostgreSQL database username.DB_PASSWORD
: PostgreSQL database password.DB_HOST
: PostgreSQL database host address.DB_PORT
: PostgreSQL database port number.DB_NAME
: PostgreSQL database name.J_SECRET
: Secret key for signing JWT tokens.BY_SECRET
: Base64 encoded key for encryption/decryption of passwords.
CipherSafe offers a secure and user-friendly solution for managing online accounts and passwords. Follow the outlined steps to set up and run both backend and frontend components, ensuring a seamless password management experience.