Skip to content

Kanvas, graph Api's (crm, inventory, social, workflows) to develop your headless app's

License

Notifications You must be signed in to change notification settings

bakaphp/kanvas-ecosystem-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Kanvas Logo

static analysis CI

Originating from our agency background, we've catered to clients with unique requirements. Over time, we realized we were repeatedly solving the same challenges: whether it was crafting a full-fledged solution, integrating with existing systems, enhancing inventory connectivity, offering agent portals for CRM expansion, introducing social interactions to headless sites, or establishing workflows for seamless system integration.

Enter Kanvas Niche.

Born from the need to streamline these repetitive tasks, Kanvas Niche offers a suite of headless modules tailored to accelerate the development of headless applications. We've encapsulated our years of experience into these modules, addressing the common hurdles we face daily in app development.

What Kanvas Niche Offers:

  • Ecosystem: Dive into authentication and teams (or multi-tenant) management.
  • Inventory: Manage products, their variants, and distribution channels efficiently.
  • Social: Engage with features like follows, comments, reactions, and messaging.
  • CRM: Navigate through leads, deals, and pipelines with ease.
  • Workflow: Seamlessly connect your app with other systems.

Why Kanvas Niche?

Kanvas Niche isn't here to replace your existing backend-as-a-service or development framework. Think of us as your development partner, complementing your tools by offering specialized modules for challenges you'd otherwise tackle from scratch.

Our name, "Niche", reflects our mission: providing specialized solutions for prevalent challenges. By integrating Kanvas Niche into your workspace, you can expedite the development of headless apps, ensuring quicker delivery and dependable performance without overhauling your existing backend.

Todo:

  • Ecosystem
  • Inventory (in progress)
  • CRM (in progress)
  • Social (in progress)
  • Workflow
  • Action Engine
  • GraphQL Documentation (in progress)

Prerequisites

  • PHP ^8.3
  • Laravel ^11.0

Initial Setup

  1. Use the docker compose up --build -d to bring up the containers. Make sure to have Docker Desktop active and have no other containers running that may cause conflict with this project's containers(There may be conflicts port wise if more than one container uses the same ports).

  2. Check the status of containers using the command docker-compose ps. Make sure they are running and services are healthy.

  3. Get inside the database container using docker exec -it mysqlLaravel /bin/bash. Then, create 4 databases: inventory, social, crm, workflow.

  4. Set up your .env: You can start by copying the .env.example setup. Next, update it with the database and Redis connection info, making sure that the host values match your container's name.

  5. Get inside the php container using docker exec -it phpLaravel bash.

  6. Generate app keys with php artisan key:generate. Note: Confirm that your app key is correctly registered in the apps table within the kanvas_laravel database.

  7. Update the app variables in your .env APP_JWT_TOKEN, APP_KEY, KANVAS_APP_ID before running the setup-ecosystem. Note: You can use the default values provided in tests.yml.

  8. Use the command php artisan kanvas:setup-ecosystem to run the kanvas setup.

  9. If you're presenting some errors after running the command from before, drop all the tables from the schema kanvas_laravel and run it again.

  10. To check if the API is working just make a GET request to http://localhost:80/v1/ and see if the response returns "Woot Kanvas".

Setup Inventory

  1. composer migrate-inventory
  2. Set env var in .env
DB_INVENTORY_HOST=mysqlLaravel
DB_INVENTORY_PORT=3306
DB_INVENTORY_DATABASE=inventory
DB_INVENTORY_USERNAME=root
DB_INVENTORY_PASSWORD=password

php artisan inventory:setup to create and initialize the inventory module for a current company

Setup Social

  1. composer migrate-social
  2. Set env var in .env
DB_SOCIAL_HOST=mysqlLaravel
DB_SOCIAL_PORT=3306
DB_SOCIAL_DATABASE=social
DB_SOCIAL_USERNAME=root
DB_SOCIAL_PASSWORD=password

php artisan social:setup to create and initialize the social module for a current company

Setup Guild

  1. composer migrate-crm
  2. Set env var in .env
DB_CRM_HOST=mysqlLaravel
DB_CRM_PORT=3306
DB_CRM_DATABASE=cr
DB_CRM_USERNAME=root
DB_CRM_PASSWORD=password

php artisan guild:setup to create and initialize the crm module for a current company

Running the project with Laravel Octane

After doing all the steps above, you could run the project with Laravel Octane by using the command php artisan octane:start --server=swoole --host=0.0.0.0 --port=8000.

Use --watch in development allowing you to refresh modified files, this works assuming to have npm install chokidar installed in the project.


Working with kanvas

Note:

  • To install Swoole you can use the command pecl install swoole
  • For production remove --watch from the command.
  • roles_kanvas_legacy will be deleted in the future.

About

Kanvas, graph Api's (crm, inventory, social, workflows) to develop your headless app's

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages