You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-50Lines changed: 37 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,71 +2,58 @@
2
2
3
3
A simple user registry backend for Secure Chain tools, built with FastAPI. This service provides user authentication, registration, password management, and token-based security, with support for MongoDB and Neo4j databases.
4
4
5
-
## Requirements
6
-
- Python 3.10+
7
-
- MongoDB & MongoDB Compass
8
-
- Neo4j
9
-
- Docker
5
+
## Development requirements
6
+
7
+
1.[Docker](https://www.docker.com/) to deploy the tool.
8
+
2.[Docker Compose](https://docs.docker.com/compose/) for container orchestration.
9
+
3. It is recommended to use a GUI such as [MongoDB Compass](https://www.mongodb.com/en/products/compass).
Create a `.env` file from the `template.env` file and place it in the `app/` directory. Modify the **Json Web Token (JWT)** secret key and algorithm with your own. You can generate your own secret key with the command **openssl rand -base64 32**.
25
22
26
-
### 3. Configure environment variables
27
-
Copy the template and fill in your secrets:
28
-
```bash
29
-
cp template.env app/.env
30
-
```
31
-
Edit `.env` with your database URIs, credentials, and JWT secrets. Example:
Ensure you have the `securechain` Docker network created. If not, create it with:
47
25
```bash
48
-
openssl rand -base64 32
26
+
docker network create securechain
49
27
```
50
28
51
-
### 4. Build and run with Docker Compose as dev
29
+
### 4. Start the application
30
+
Run the command from the project root:
52
31
```bash
53
-
docker-compose -f dev/docker-compose.yml up --build
32
+
dockercompose -f dev/docker-compose.yml up --build
54
33
```
55
-
This will build the backend and expose it on port 8001 (mapped to 8000 inside the container).
56
34
57
-
## API Overview
35
+
### 5. Access the application
36
+
The API will be available at [http://localhost:8001](http://localhost:8002). You can access the API documentation at [http://localhost:8001/docs](http://localhost:8002/docs).
37
+
38
+
## Python Environment
39
+
The project uses Python 3.13 and the dependencies are listed in `requirements.txt`.
40
+
41
+
### Setting up the development environment
42
+
43
+
1.**Create a virtual environment**:
44
+
```bash
45
+
python3.13 -m venv auth-env
46
+
```
58
47
59
-
### Authentication Endpoints
60
-
-`POST /auth/signup` — Register a new user
61
-
-`POST /auth/login` — Login and receive access/refresh tokens
62
-
-`POST /auth/logout` — Logout and revoke refresh token
63
-
-`POST /auth/account_exists` — Check if an account exists
64
-
-`POST /auth/change_password` — Change user password
0 commit comments