Introduction
This microservice is dedicated to user management, encompassing a wide range of functionalities essential for user onboarding and management. From initial registration to ongoing user profile maintenance, it orchestrates the entire user onboarding flow with efficiency and reliability.
Tech Stack
Backend Framework:
- FastAPI: Employed as the backend framework, FastAPI offers a high-performance, Python-based platform for crafting APIs. Its asynchronous capabilities enable efficient handling of concurrent requests, making it well-suited for modern web development.
Database:
- Azure Cosmos DB: Selected as the database solution, Azure Cosmos DB provides a globally distributed, multi-model database service. Its scalability and flexibility empower seamless storage and management of diverse data types, facilitating the development of robust and adaptable applications.
Functionality
- User Onboarding: This service orchestrates the user onboarding process, providing APIs for user profile management. Users can seamlessly navigate through various stages of onboarding, including account creation, personal information submission, and verification.
Installation
Clone this repository to your local machine:
git clone https://github.com/miralabsai/user-service.git
Navigate to the project directory:
cd user-service
Create a virtual environment (recommended) using
venv
orvirtualenv
:# Using venv python -m venv venv # Activate the virtual environment source ./venv/Scripts/activate
Install the required dependencies:
pip install -r requirements.txt
Setting up Environment Variables
Copy the
.env.example
file to create a new.env
file:cp .env.example .env
Edit the
.env
file and provide appropriate values for the environment variables.
Running the service
To run the service, use the following command:
python -m uvicorn app.main:app --reload --port 5001
This will start the server on http://localhost:5001.
You can now access the Swagger UI for interactive documentation at http://localhost:5001/docs.