Git Product home page Git Product logo

primo-server's Introduction

Primo Server

Primo is a component-based CMS that makes it easier to develop, manage, and publish static sites. This project hosts Primo as a SvelteKit application and integrates it with Supabase to enable authentication, media uploads, and data storage. A single Primo server can handle hundreds of sites, publishes static sites to their own repos/endpoints, and enables rapid component-driven development.

screenshot

This is a base repository for Primo Server that you can fork to host your own Server. All you need is a Supabase and Vercel or Cloudflare account (all free), and a few minutes to put up your Server from which you can create and manage one to hundreds of sites. Compared to Primo Desktop, Primo Server enables you to access your sites online, collaborate with developers and marketers, and upload images. You can also access your Server sites from Primo Desktop.

Features

  • Multiple users
  • Image uploads
  • Use from anywhere

Project Status

Primo Server is in Beta. It is stable enough for personal projects.

How it works

This repo deploys Primo to Vercel or Cloudflare and uses Supabase for authentication, database (PostgreSQL), and storage.

Setup

Primo can be run on the free tier of either service (Vercel/Cloudflare & Supabase), and you can sign in with Github.

Before deploying your Primo Server, you'll need to sign up for Supabase and create a new project.

1. Fork this repository

image

2. Deploy Backend (Supabase)

  1. Create a Supabase account or sign in with Github
  2. Create a new project
  3. Disable email confirmations (Authentication > Providers > expand Email and uncheck 'Confirm email')
  4. Select 'SQL' from the sidebar navigation
  5. Click + New query
  6. Paste in the contents of ./primo_schema.sql and click 'RUN' query

3. Deploying Frontend

Deploying to Vercel:

  1. Create a new Vercel project
  2. Select your forked repository
  3. Enter the following environment variables: your Supabase project URL, Public Key (anon public), and Admin Key (service_role secret) (which you can find in the Supabase project dashboard > Settings > API https://app.supabase.io/project/---yourprojectid---/settings/api) and deploy.
  • VITE_SUPABASE_URL
  • VITE_SUPABASE_PUBLIC_KEY
  • VITE_SUPABASE_ADMIN_KEY

image

Deploying to Cloudflare Pages:

  1. Create a new Cloudflare Pages project
  2. Select your forked repository
  3. Configure the project according to the screenshot below - don't select a framework preset, enter the build command, output directory, and the following environment variables - and deploy.
  • VITE_SUPABASE_URL
  • VITE_SUPABASE_PUBLIC_KEY
  • VITE_SUPABASE_ADMIN_KEY
  • NODE_VERSION = 16

Screenshot 2023-02-14 at 12 11 08 AM

  1. Navigate to your new Primo Server. Sign up with an email address and password (this will be the admin account).

image

Updating

You can merge upstream updates by clicking 'Sync fork' on your forked repository. Your updates will automatically deploy to your Vercel/Cloudflare account.

primo-server's People

Contributors

mateomorris avatar

Stargazers

Squireblackden 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.