A Rust-powered database that uses GitHub Gists as a storage layer. Simple, Reliable, and Secure.
- GitHub Gists Integration: Leverage GitHub's infrastructure for document storage
- Rust-Powered Backend: High-performance API server built with Cloudflare Workers
- Collection Management: Organize documents into named collections
- Search Capabilities: Document search within collections
- Health Monitoring: Built-in system health checks and status reporting
curl https://gist-db.mohammadsadiq4950.workers.dev/https://gist-db.mohammadsadiq4950.workers.dev/docsAll protected endpoints require a GitHub Personal Access Token within gist scope:
curl -H "Authorization: Bearer YOUR_GITHUB_TOKEN" \
https://gist-db.mohammadsadiq4950.workers.dev/api/databasesGET /GET /healthGET /docs/openapi.yamlResponse:
Returns the OpenAPI specification in YAML format.
GET /docsResponse:
Returns the Swagger UI for interactive API exploration.
POST /api/databases
Content-Type: application/json
Authorization: Bearer <token>
{
"name": "my_database"
}Response:
{
"status": 201,
"data": {
"gist_id": "2b4d4b3e6a04a54d5a9d"
},
"message": "Database created successfully",
"error": null
}DELETE /api/databases
Content-Type: application/json
Authorization: Bearer <token>
{
"gist_id": "2b4d4b3e6a04a54d5a9d"
}Response:
{
"status": 200,
"data": null,
"message": "Database deleted successfully",
"error": null
}POST /api/collections
Content-Type: application/json
Authorization: Bearer <token>
{
"gist_id": "2b4d4b3e6a04a54d5a9d",
"name": "users"
}Response:
{
"status": 201,
"data": {
"collection_name": "users"
},
"message": "Collection created successfully",
"error": null
}DELETE /api/collections
Content-Type: application/json
Authorization: Bearer <token>
{
"gist_id": "2b4d4b3e6a04a54d5a9d",
"collection_name": "users"
}Response:
{
"status": 200,
"data": null,
"message": "Collection deleted successfully",
"error": null
}POST /api/objects
Content-Type: application/json
Authorization: Bearer <token>
{
"gist_id": "2b4d4b3e6a04a54d5a9d",
"collection_name": "users",
"data": {
"name": "Alice",
"age": 28,
"email": "[email protected]"
}
}Response:
{
"status": 201,
"data": {
"object_id": "12345"
},
"message": "Object created successfully",
"error": null
}PUT /api/objects
Content-Type: application/json
Authorization: Bearer <token>
{
"gist_id": "2b4d4b3e6a04a54d5a9d",
"collection_name": "users",
"object_id": "12345",
"data": {
"age": 29
}
}Response:
{
"status": 200,
"data": {
"object_id": "12345"
},
"message": "Object updated successfully",
"error": null
}DELETE /api/objects
Content-Type: application/json
Authorization: Bearer <token>
{
"gist_id": "2b4d4b3e6a04a54d5a9d",
"collection_name": "users",
"object_id": "12345"
}Response:
{
"status": 200,
"data": null,
"message": "Object deleted successfully",
"error": null
}POST /api/search
Content-Type: application/json
Authorization: Bearer <token>
{
"gist_id": "2b4d4b3e6a04a54d5a9d",
"collection_name": "users",
"query": "Alice",
"field": "name"
}Response:
{
"status": 200,
"data": [
{
"object_id": "12345",
"data": {
"name": "Alice",
"age": 28,
"email": "[email protected]"
}
}
],
"message": "Search completed",
"error": null
}Contributions welcome! Please follow guidelines:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the GNU AGPLv3.
- Any modifications or usage in a networked environment must be open-sourced.
- If you wish to use this project commercially without open-sourcing modifications, please contact me for a commercialย license.
Creator and Maintainer: Md.Sadiq
