Skip to content

ByteKatana/simpl-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

72 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Simpl:API

License Badge Codacy Badge GitHub package.json version

Versatile headless CMS from personal portfolio to enterprise automation

πŸ“– Documentation:
New documentation coming soon.
(with new Simpl:API Studio update)


⚑ Overview

Simpl:API is a versatile headless CMS built for flexibilityβ€”from personal projects to enterprise-scale automation. Model any content structure with custom Entry Types through a modern Simpl:API Studio or programmable REST API. Secure your workflows with granular Role-Based Access Control for both users and API keys, per-API-key rate limiting, seamless OAuth 2.0 authentication across 10+ providers, and comprehensive audit logs alongside request analytics.

✨ Features

  • πŸ—οΈ Custom Content Modeling (Entry Types): Use the powerful builder to define custom structured data types (called Entry Types) that fit your project's specific needs.
  • πŸ“ Content Management via Studio & API: Effortlessly create, process, and delete content within your defined Entry Types using the intuitive Simpl:API Studio UI or directly via the robust Simpl:API REST API endpoints.
  • πŸ”’ RBAC & Permission Groups: Secure your application with Role-Based Access Control (RBAC). Create permission groups to manage granular access for both users and API Keys, ensuring the right people and services have the right level of access.
  • πŸ”§ API Key Management with Rate Limiting: Generate API Keys with built-in fixed-window rate limiting. Control the frequency of requests per API Key to protect your services and manage resource usage effectively. Other rate limiting methods are planned for future updates.
  • πŸ“ˆ Dashboard Statistics & Detailed Logging: Gain insights into your API usage with statistical data displayed on the Studio dashboard. Monitor every request with per-request logs, including response times, status codes, and rate limit tracking.
  • πŸ›‘οΈ Comprehensive Authentication: Support for 10+ OAuth providers (including Google, GitHub, GitLab, Bitbucket, Apple, and more) alongside traditional email and password registration. Advanced features like Passkeys, OTP, and 2FA are currently in the roadmap.
  • 🎨 Modern Studio UI: A state-of-the-art management interface built with React, Next.js, shadcn/ui, and TanStack, providing a seamless experience for modeling content and managing your API ecosystem.

πŸš€ Use Case Scenarios

Some of the use cases for Simpl:API include:

1. Personal Blog or Portfolio

  • Setup: Create an "Article" Entry Type with fields for title, slug, content, cover_image, and tags.
  • Workflow: Use the Simpl:API Studio to write and publish your posts.
  • Consumption: On your personal website (built with Next.js or Astro), fetch the articles using a restricted API Key. This allows you to decouple your content management from your site's code.

2. Inventory & E-commerce Data Processing

  • Setup: Define a "Product" Entry Type with fields for sku, price, stock_quantity, and status.
  • Workflow: Your warehouse management system or a cron job can actively update the stock_quantity and price via the REST API endpoints. You can use this data to trigger automated systems to do things like send out stock and price alerts, or display the change in a line graph and more.
  • Monitoring: Use the Studio dashboard to track how often your inventory system updates data and monitor logs to ensure all automated updates are succeeding.
  • Security: Create a specific "Inventory Update" Permission Group for the API Key used by your warehouse system, restricting it to only update the "Product" entry type without allowing deletions or structural changes.

3. Mobile App Configuration & Remote Features

  • Setup: Create a "Config" Entry Type with fields for feature_flags, api_endpoint_overrides, and maintenance_mode.
  • Workflow: Update app settings instantly through the Studio without needing to push a new version to the App Store.
  • Consumption: Your mobile application fetches this configuration at startup. Use Rate Limiting to ensure that even with a large user base, the configuration endpoint remains stable and protected from excessive polling.

...and many more. These are just few examples of the many use cases Simpl:API can help you solve.

πŸ“¦ Installation & Usage

Basic installation instructions are provided below. For more details check the documentation

Prerequisites

Installation

  1. Clone this repository:
    git clone https://github.com/your-username/simpl-api.git
    cd simpl-api
  2. Create your .env file from .env.example and populate your .env file.
  3. Run the build script:
    npm run build
  4. Create initial required db collections:
      npx prisma db push 
  5. Start the application
    npm run start

6.Open http://localhost:3000/setup with your browser to complete the setup process.

πŸ™‹πŸ»β€β™‚οΈ Support

If you have any questions or need help, you can create an issue on the GitHub repository.

🧱 Tech Stack

Language:
Typescript

Runtime:
Node.js

Framework:
Next React

Database:
MongoDB Prisma Redis

Authentication:
NextAuth

Simpl:API Studio (UI):
shadcn/ui Tanstack Zustand Tailwind CSS Zod

Tools:
ESLint Prettier

Testing:
Jest Testing Library Cucumber Cypress

Others:

πŸ—ΊοΈ Roadmap

You can check the project's kanban board to find out about what is going on with the project.

πŸ€œπŸ€› Contributing

If you find this project interesting, and want to contribute, please read the contributing guidelines.

🧾 License

This is an open-sourced software licensed under the AGPL v3.

About

Versatile headless CMS from personal portfolio to enterprise automation

Topics

Resources

License

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Contributors