Giter VIP home page Giter VIP logo

jihedmastouri / shortyio Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 1.58 MB

A headless CMS written in Go + React

License: GNU Affero General Public License v3.0

Go 35.61% Makefile 1.26% Shell 0.19% PLpgSQL 2.42% Dockerfile 0.44% HTML 0.17% JavaScript 0.23% TypeScript 57.21% CSS 2.48%
cms consul docker go golang grpc makefile microservice mongodb nats postgresql sql axios radix-ui react tailwind tanstack-query vite

shortyio's Introduction

Shortyio

⛔ This project is on hold

This repository contains the codebase for my end-of-studies project.

Shortyio is a proof-of-concept for a Headless CMS that can be used to power any JAM Stack application.

Headless CMS in JAM Stack

To build a CMS that can be used universally we defined every web component as a Block.

A Block can be anything and most importantly it can contain other blocks, but fundamentally it's composed of files, text, or rich text.

blocks: database schema

Content

Backend Structure

The backend is implemented in Go and employs various design patterns including CQRS (Command Query Responsibility Segregation) and Event-Driven architecture.

The idea is to build each component into its own microservice and have them communicate, whether through a message queue (in our case NATS) or gRPC.

This is an experimental project; Some of the decisions made were not the best.

Higher level architecture

Because we are following a CQRS architecture, we decided to opt for two types of databases:

  • PostgreSQL for write operations
  • MongoDB for read operations

Microservices:

Detailed architecture

This is the project structure. Each of these is a Go project (module) that will run as a microservice. We use Docker and Docker-compose for local development.

├── Aggregator
├── Commands
│   ├── FlipFlop
│   └── Metamorphosis
├── Queries
├── Shared
├── Web
└── go.work
  • Aggregator: Responsible for aggregating data from the write database to the read database.
  • Commands:
    • FlipFlop: Handles creation and deletion operations.
    • Metamorphosis: Manages update operations.
  • Queries: Responsible for handling read operations.
  • Shared: Contains a shared library used by multiple microservices.
  • Web: The gateway between our backend and either the dashboard or a Rest API.

If you are are wondering about the lacking of a user management and auth service it's because we are using KeyCloak a fully integrated user-management solution.

All services are registered and monitored through Consul: Service Registry/Discovery and a KV store for configs.

Services that are communicating directly using gRPC need to go through Consul and perform a look-aside load balancing technique.

Frontend

The frontend is built using React+TS and incorporates a custom design system. This design system is based on Radix UI, Tailwind CSS, and TanStack Table.

It's worth noting that this design system was developed prior to the release of shadcn/ui, and it may have served as an inspiration for that project (I'm joking ofc).

Specifications:

React 18 + Vite
TypeScript
Tailwind
Radix UI + TanStack Table
TanStack Query
Axios

LICENSE

Shortyio: A Headless CMS

Copyright (C) 2023 Jihed MASTOURI

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

shortyio's People

Contributors

jihedmastouri avatar

Stargazers

chimera kang avatar Tuan Duc Tran avatar Mohamed Amine Ben Ameur avatar Mahdi Boukhadra avatar Firas GACHA avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.