{"id":28717223,"url":"https://github.com/alpha-strike-space/application-programmer-interface","last_synced_at":"2026-05-08T04:38:47.433Z","repository":{"id":298578102,"uuid":"994468091","full_name":"alpha-strike-space/Application-Programmer-Interface","owner":"alpha-strike-space","description":"The alpha-strike.space Application Programmer Interface development file. Mostly, written in the C++ language utilizing the Crow framework.","archived":false,"fork":false,"pushed_at":"2025-06-11T21:09:46.000Z","size":3917,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-11T21:27:12.564Z","etag":null,"topics":["api","cpp","cpp17","curl","json","libpqxx","nlohmann-json"],"latest_commit_sha":null,"homepage":"https://api.alpha-strike.space/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alpha-strike-space.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-02T01:27:57.000Z","updated_at":"2025-06-11T21:09:49.000Z","dependencies_parsed_at":"2025-06-11T21:27:39.729Z","dependency_job_id":"d1a11ef5-d61c-473a-97f2-8a27c7e11fd4","html_url":"https://github.com/alpha-strike-space/Application-Programmer-Interface","commit_stats":null,"previous_names":["alpha-strike-space/application-programmer-interface"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alpha-strike-space/Application-Programmer-Interface","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha-strike-space%2FApplication-Programmer-Interface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha-strike-space%2FApplication-Programmer-Interface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha-strike-space%2FApplication-Programmer-Interface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha-strike-space%2FApplication-Programmer-Interface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alpha-strike-space","download_url":"https://codeload.github.com/alpha-strike-space/Application-Programmer-Interface/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha-strike-space%2FApplication-Programmer-Interface/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259914929,"owners_count":22931334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cpp","cpp17","curl","json","libpqxx","nlohmann-json"],"created_at":"2025-06-15T03:13:49.079Z","updated_at":"2026-05-08T04:38:47.427Z","avatar_url":"https://github.com/alpha-strike-space.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Application-Programmer-Interface\nThe https://frontier.alpha-strike.space/ Application Programmer Interface development repository mostly written in the C++ language utilizing the Crow framework. You may find more information about the amazing Crow framework at https://crowcpp.org/master/ that which makes this service possible. \n\n# Local API Testing Guide (BSD/Linux)\n\n## Prerequisites\n\n- **Compiler:** GCC (\u003e= 10) or Clang (\u003e= 11)\n- **CMake:** \u003e= 3.14\n- **Crow framework** (ensure you use the maintained fork, e.g. [CrowCpp/Crow](https://github.com/CrowCpp/Crow))\n- **Dependencies:** Any dependencies are in the CMakeLists.txt file.\n\n## Setup\n\n```sh\n# Clone the repository\ngit clone https://github.com/alpha-strike-space/Application-Programmer-Interface.git\ncd Application-Programmer-Interface\n\n# Create and enter a build directory\nmkdir build \u0026\u0026 cd build\n\n# Configure with CMake\ncmake ..\n\n# Build the project\nmake\n```\n\n\u003e **macOS Users:** The standard build process may require extra steps. Please see the detailed **[macOS Build Guide](BUILD_MACOS.md)** for specific instructions.\n\n## Running the API\n\nPlease make a visit to https://github.com/alpha-strike-space/PostgreSQL-Configuration if you have any questions regarding how the database tables are set up. Now, to run this server in development or production, you must provide the following environment variables so it can connect to the PostgreSQL database:\n\n### PgBouncer (for Routes.cpp and pooled queries in pgListener.cpp)\n- `PGBOUNCER_HOST`: Name of Bouncer Service\n- `PGBOUNCER_PORT`: Typically, port 6432\n- `PGBOUNCER_DB`: DB name\n- `PGBOUNCER_USER`: DB user\n- `PGBOUNCER_PASSWORD`: DB user password\n  \n### PostgreSQL Direct (for LISTEN/NOTIFY in pgListener.cpp)\n- `PGDIRECT_HOST`: Name of PG Service\n- `PGDIRECT_PORT`: Typically, port 5432\n- `PGDIRECT_DB`: DB name\n- `PGDIRECT_USER`: DB user\n- `PGDIRECT_PASSWORD`: DB user password\n\nYou can set these variables in-line when you execute the binary from the project root. Many different ways these variables may be declared. Best practice in run-time is to load them not from a .env file. Although, this is perfectly fine for development.\n\n- The default application port is usually `8080` (check your `Server.cpp` or config).\n- On BSD, replace `make` with `gmake` if necessary.\n\n## Testing Endpoints Locally\n\nYou can test endpoints using `curl` or tools like [HTTPie](https://httpie.io/):\n\nNote: Cross reference an endpoint and try it out.\n\n```sh\ncurl http://localhost:8080/endpoint\n```\n\nNote: This is for future reference. We do not have a post function yet.\n\nFor POST requests with JSON:\n```sh\ncurl -X POST -H \"Content-Type: application/json\" -d '{\"key\":\"value\"}' http://localhost:8080/endpoint\n```\n\nFor Websocket connections:\n```sh\nwscat -c ws://localhost/endpoint\n```\n\n## Example Endpoints\n\n| Method | Path                | Description        |\n|--------|---------------------|--------------------|\n| GET    | /health             | Health check       |\n| POST   | /endpoint           | Example resource   |\n\n\u003e Replace with actual endpoints.\n\n## Example Websocket\n\n| Path                | Description        |\n|---------------------|--------------------|\n| /mails              | Incidents          |\n\n\u003e Replace with actual websocket.\n\n## Troubleshooting\n\n- **Port in Use:** If 8080 is in use, change the port in your Server.cpp.\n- **Missing Libraries:** Install dependencies using your OS package manager (e.g., `apt`, `pkg`, or `brew`).\n- **Permission Denied:** Make sure the binary is executable: `chmod +x server`\n\n## BSD Notes\n\n- Use `gmake` if `make` fails.\n- Ensure you have all developer tools installed: `pkg install gcc cmake git gmake`\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpha-strike-space%2Fapplication-programmer-interface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falpha-strike-space%2Fapplication-programmer-interface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpha-strike-space%2Fapplication-programmer-interface/lists"}