A FastAPI-based service for managing fake NID (National ID) records.
- Create and retrieve NID records
- Auto-generates 13-digit NIDs
- SQLite database by default
- OpenAPI/Swagger documentation
- Python 3.10+
- Docker (optional, for containerized runs)
-
Clone the repository:
git clone <your-repo-url> cd FakeNidServer
-
Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
-
Run the application:
uvicorn main:app --reload --host 0.0.0.0 --port 8000
-
Access the API docs:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
-
Build and start the container:
docker-compose up --build
-
Access the API docs:
- Swagger UI: http://localhost:8000/docs
- The default
.envfile is set up for SQLite:DB_URL=sqlite:///./fakenid.db
FakeNidServer/
├── Docker/
│ └── Dockerfile
├── routes/
│ └── nid.py
├── models.py
├── database.py
├── main.py
├── schemas.py
├── services.py
├── requirements.txt
├── .env
├── .gitignore
└── docker-compose.yml