-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Comments
Perfect Timing! #45 is the start of the prep for this! |
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? |
That should be fine! just let me know if we need any new virtual components added to the helper 😄 |
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 |
I love the idea, the more flexible we are to bring in other integrations sound good to me 🫡 |
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.
|
Branch issue-0050 created for issue: Separation of logic: migrating to Astro Theme Provider |
* Create draft PR for #50 [skip ci] * ♻️ Chore: Setup new Table Schemas, and Implement Helpers (component and function helpers) (#79) * Create draft PR for #78 [skip ci] * add new workflows to send messages for first time contributors * Update firsttimepr.yml * ♻️ Chore: Update Database Start page to reflect new theme and utilize batch transactions (#76) * Create draft PR for #71 [skip ci] * Update - New setup page and done page implemented. as well as some OptionsSchema cleanup * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/done.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/setup.ts Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/setup.ts Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/setup.ts Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/setup.ts Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/setup.ts Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * update as per dreyfus's comment * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Jacob Jenkins <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Jacob Jenkins <[email protected]> --------- Co-authored-by: create-issue-branch[bot] <53036503+create-issue-branch[bot]@users.noreply.github.com> Co-authored-by: Adam Matthiesen <[email protected]> Co-authored-by: Adam Matthiesen <[email protected]> Co-authored-by: Paul Valladares <[email protected]> Co-authored-by: Jacob Jenkins <[email protected]> * Update firsttimepr.yml * Create draft PR for #78 [skip ci] * Chore: Update Security implementation for local username/password auth and start the process of converting the dashboad edit pages to utilitze HTMX based server rendering * new schema is working! Woo! This will give tons of future options! * more progress updates * dashboard update progress checkpoint * another progress checkpoint... dashboard is coming along nicely * fix old reference about page being a post * new helper function to get content * update so frontend doesn't cry about new schema * progress update - updated frontend to use new content helper and removed old page schema * chore: Update astro:db:setup hook in studioCMS.ts * I think everything is updated and working properly. just running tests now * Add getUserById and getUserList helper functions to the contentHelper module for retrieving user data from the Astro Studio's Database. * chore: Update registration API to validate email address before creating a new user and use it to generate a gravatar avatar for local users without oAuth * more cleanup * chore: Update StudioCMS config handling and error messages * update config and admin pages to reflect new UI changes * Update types and fix typos created from that * new navbar component working and can be customized * update navigation * Update .github/workflows/firsttimepr.yml Co-authored-by: Jacob Jenkins <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/index.ts Co-authored-by: Jacob Jenkins <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/done.astro Co-authored-by: Jacob Jenkins <[email protected]> * Update packages/studioCMS/src/components/exports/Navigation.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/components/exports/Navigation.astro Co-authored-by: Paul Valladares <[email protected]> * update helptext on admins page * Update close button ID in Header component * chore: Update optionsSchema in studioCMS.ts --------- Co-authored-by: create-issue-branch[bot] <53036503+create-issue-branch[bot]@users.noreply.github.com> Co-authored-by: Adam Matthiesen <[email protected]> Co-authored-by: Bryce Russell <[email protected]> Co-authored-by: Adam Matthiesen <[email protected]> Co-authored-by: Jacob Jenkins <[email protected]> Co-authored-by: Paul Valladares <[email protected]> * progress checkpoint... frontend moved, blog package created * chore: Update dependencies and paths in tsconfig files * chore: Update dependencies and paths in tsconfig files * Progress checkpoint.... its working.... someone tell me im not crazy.... please? * ASTROENV!!!!! * Some more Astro:ENV * Some more cleanup * Some more work and cleanup * progress checkpoint * Buahahaha i fixed the typing stuffs * cleanup, and some new helpers as well as fixes to some weird CSS styles getting put on pages they werent supposed to be getting put on * update, and progress checkpoint * new header system * fix tsconfig * cleanup dts file * AIK Utilities... makes things cleaner * update monorepo deps * chore: Update @moonrepo/cli to version 1.25.5 * chore: Update @moonrepo/cli to version 1.25.3 * refactor: Update CMS description in package.json and README.md * more cleanup and better organization of utilities * refactor: Add package relation column to page list in dashboard * cleanup and migrate logger for ImageHandler * Dashboard integration cleanup * more cleanup * Updates... continuing cleanup, and getting ready to start actually finishing this pr... * more dashboard cleanup. * Blog index page update * Tweaking, and page routes, and rss route now! * More refactoring * update deps * fix * deps * dedupe * Update requested changes from Bryce * update favicon to utilize mrmime * Create helper function for defining StudioCMS Plugins using the current exports * update rss feed * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/dashboard/pages/configuration/admins.astro Co-authored-by: Jacob Jenkins <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/dashboard/pages/configuration/admins.astro Co-authored-by: Jacob Jenkins <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/dashboard/pages/configuration/index.astro Co-authored-by: Jacob Jenkins <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/dashboard/pages/edit/pages/[...slug].astro Co-authored-by: Paul Valladares <[email protected]> * update AuthSecurityConfig as per Dreyfus request * rename cFav to configFav as per jdtjenkins request * rename CImage to CustomImage and update all occurrences * rename oResolver to optionsResolver * update UnoCSS * update scrollbarCSS and remove unocsspresetscrollbar due to not working * new viewtransition API works!!!! This option is now implemented as an OPTIONAL feature! * fix responsive layout * make login page responsive * update icons - i found a better source for MOST of our dashboard icons instead of local file * unocss cleanup and fix darkmode selector (used by only a few of the internal things on the dashboard... this will make things way easier) * update deps, and fix auth tables to align with lucia-astrodb-adapter(custom version for now due to lack of updates) * Update README.md Co-authored-by: Jacob Jenkins <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/dashboard/pages/delete/pages/[...slug].astro Co-authored-by: Jacob Jenkins <[email protected]> * update as per jumper requests * use container API to render post content for RSS feed * page partial bug resolved * cleanup names on rssfeed, rss feed is much simplier now * new const var for SiteConfigId as per jumper request * do not show delete button as jumper request * fix lockfile and dupped package.json * remove exclusion * disable studioCMSBlog due to weird fserror --------- Co-authored-by: Adam Matthiesen <[email protected]> Co-authored-by: Bryce Russell <[email protected]> Co-authored-by: Adam Matthiesen <[email protected]> Co-authored-by: Jacob Jenkins <[email protected]> Co-authored-by: Paul Valladares <[email protected]> Co-authored-by: Jacob Jenkins <[email protected]>
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
I would like to see StudioCMS be split into separate packages
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:
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.
The text was updated successfully, but these errors were encountered: