Skip to content

infiniteuny/soca

Repository files navigation

Soca

Soca is a system that wraps a CCTV NVR and expose it as API. This app built with FastAPI.

Getting Started

You can start editing the app by modifying files inside the soca folder. The app auto-updates as you edit the file.

Project Structure

.
└── soca
    ├── application     # Application business rules
    ├── domain          # Enterprise business rules
    ├── infrastructure  # Framework and drivers
    └── presentation    # User interface

Development

  1. Set up the development environment

    You need to set up your development environment before you can do anything.

    Install Python and Poetry.

  2. Install the dependencies

    poetry install
  3. Run in development mode

    uvicorn soca.main:app --host 0.0.0.0 --reload

    Open http://localhost:8000 with your browser to see the result. You can also check the API documentation at http://localhost:8000/docs.

Deployment

  1. Start the Uvicorn server

    uvicorn soca.main:app --host 0.0.0.0 --port 80

Learn More

To learn more about FastAPI, take a look at the following resources: