--- title: FPTCheckInFastAPI emoji: "πŸ“‹" colorFrom: "indigo" colorTo: "pink" sdk: docker app_file: Dockerfile pinned: false --- # πŸš€ FPT CheckIn Server This project uses **FastAPI** to build a fast, easy-to-use, and scalable RESTful API. --- ## 🧠 System Requirements - Python 3.7 or later - pip to manage libraries --- ## πŸ“¦ Installation 1. **Clone the project:** ```bash git clone https://github.com/Hoanha2101/Server_CheckInAppMobile.git cd Server_CheckInAppMobile ``` 2. **Create virtual environment (optional but recommended):** ```bash # Create virtual environment python -m venv venv # Activate virtual environment # On Windows: venv\Scripts\activate # On macOS/Linux: source venv/bin/activate ``` 3. **Install required libraries:** ```bash pip install -r requirements.txt ``` If you don't have the requirements.txt file, you can install it directly: ``` pip install fastapi uvicorn ``` 4. **πŸš€ Run the application** Run the following command to start the FastAPI server in development mode (with automatic reload when code changes): ``` uvicorn main:app --reload #hoαΊ·c uvicorn main:app --host 0.0.0.0 --port 8000 ``` Explanation: + main: is the name of the Python file, for example main.py + app: is the FastAPI() object in that file + --reload: automatically reload when code changes (for devs) 5. **🌐 Access API documentation** After running successfully, access the browser: Swagger UI (visual API testing interface): ``` http://127.0.0.1:8000/docs ``` Redoc (alternative documentation interface): ``` http://127.0.0.1:8000/redoc ``` # πŸ“ Configuration project architecture ``` πŸ“ β”‚ config.py β”‚ connectDatabase.py β”‚ faceDetect.py β”‚ FaceNet.py β”‚ main.py β”‚ README.md β”‚ requirements.txt β”‚ β”œβ”€β”€β”€images β”‚ check_image.jpg β”‚ faceArea.jpg β”‚ β”œβ”€β”€β”€sql β”‚ CreateData.sql β”‚ β”œβ”€β”€β”€weights β”‚ data.pickle β”‚ yolov8n-face.pt β”‚ └───__pycache__ config.cpython-39.pyc connectDatabase.cpython-39.pyc faceDetect.cpython-39.pyc FaceNet.cpython-39.pyc main.cpython-39.pyc ```