Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separation of logic: migrating to Astro Theme Provider #50

Open
BryceRussell opened this issue May 3, 2024 · 7 comments · May be fixed by #77
Open

Separation of logic: migrating to Astro Theme Provider #50

BryceRussell opened this issue May 3, 2024 · 7 comments · May be fixed by #77
Assignees
Labels
enhancement New feature or request feat refactor

Comments

@BryceRussell
Copy link
Member

Is your feature request related to a problem? Please describe.

  • The blog route is included with StudioCMS. What if a user wants to use StudioCMS independently of the theming/styling it provides? For example, using StudioCMS as a CMS on an existing website. I imagine most user's of StudioCMS will want to use StudioCMS as a backend for content without extra routes like the blog

Describe the solution you'd like

I would like to see StudioCMS be split into separate packages

  1. A core package that provides the core functionality and a dashboard for StudioCMS
  2. Official themes (blog, docs, etc) that use the core package as a backend for editing content

This would allow users to use the core package if they want a CMS for their own routes (like a traditional CMS), and use themes if they want to use pre-built routes for a blog, docs, etc.

This separation of packages is a perfect opportunity to migrate towards Astro Theme provider. Astro Theme Provider already has the APIs that StudioCMS needs to facilitate this migration, and it would simplify the integration code.

Describe alternatives you've considered

One alternative is to not use Astro Theme Provider, but continuing with the current structure has some problems:

  • The problems I have already mentioned in previous sections
  • No reason to re-design and engineer APIs that already exist inside of Astro Theme Provider

Additional context

I am willing to take ownership of this issue. I am looking for opinions/permission before tackling such a large change, I am available to chat if anyone has questions or wants a more detailed explanation than what I can do in text.

@Adammatthiesen
Copy link
Member

Perfect Timing! #45 is the start of the prep for this!

@BryceRussell
Copy link
Member Author

Awesome! I will be publishing ATP v0.3.0 soon, after that is published and #45 is merged, I want to start working on a draft for this. Is that ok?

@Adammatthiesen Adammatthiesen added enhancement New feature or request feat refactor labels May 3, 2024
@Adammatthiesen
Copy link
Member

That should be fine! just let me know if we need any new virtual components added to the helper 😄

@jdtjenkins
Copy link
Contributor

Headless StudioCMS when??????

Yeah I love this idea, as Adam said it's already starting to get more and more separated and more decoupled.

Because I'm imagining something like this:

// astro.config.mjs

integrations: [
  studioCMS({
    themes: [ // don't care about the name, just a placeholder for now
      blog(), // this adds say all the routes for your blog and could even add APIs for you to manage the blog AND adds it's own routes into the dashboard,
      docs(),
      storefront(),
      imageGallery(), // idk but you get the idea
    ],
  })
]

Then we can use ATP to create a whole theme with it's own pages, customisable components and just generally awesome stuff?

Yeah I'm down, I love this idea

@dreyfus92
Copy link
Member

I love the idea, the more flexible we are to bring in other integrations sound good to me 🫡

@Adammatthiesen
Copy link
Member

Adammatthiesen commented May 11, 2024

After our previous discussions i believe this would be better as multi-step PR. The First, to setup the new schemas and helpers, and the Second, to implement ATP for the front-end.

  • Setup new Table Schemas, and Implement Helpers (component and function helpers)
  • Migrate front-end to utilize ATP

Copy link
Contributor

Branch issue-0050 created for issue: Separation of logic: migrating to Astro Theme Provider

create-issue-branch bot added a commit that referenced this issue May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feat refactor
Projects
Development

Successfully merging a pull request may close this issue.

4 participants