/primo-server

Run primo on your own server to use it from anywhere & invite collaborators

Primary LanguageSvelteGNU Affero General Public License v3.0AGPL-3.0

Primo Server

screenshot

This project lets you run Primo on your own server so you have full control over your own data and can edit your sites from any device, as well as invite others to collaborate.

If you're just building websites for yourself, you may prefer just using Primo Desktop. But this project allows you to run Primo in the cloud so that you can access and edit your sites from any device and collaborate with other developers/content editors (not at the same time), as well as edit them from Primo Desktop.

Features

  • Multiple users
  • Image uploads
  • Use from anywhere

Project Status

Primo Server is in Alpha. Features may break from version to version, but probably not enough to delete all your data or anything drastic.

Until we ge to Beta, we can't recommend using primo in production (but it's good enough for personal projects).

How it works

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

Setup

Primo can be run on the free tier of both services (Vercel & Supabase), but you'll need to sign in with Github.

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

1. Deploy Backend (Supabase)

  1. Create a Supabase account or sign in with Github
  2. Create a new project
  3. When it's ready, select 'SQL' from the sidebar navigation
  4. Click + New query
  5. Paste in the contents of ./primo_schema.sql and click 'RUN' query
  6. Disable Email confirmations (Authentication > Settings > Email Auth)

2. Deploy Frontend (Vercel)

Deploy with Vercel

  1. Click this nice button and follow the prompts.
  2. Under 'Configure Project', enter 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)
  3. Click 'Deploy'
  4. Sign up with an email address and password (this will be the admin account). For now, the server has a single email/password account which can send invitation URLs to collaborators.

Updating

At the moment, the only way to update your server instance to a newer version of primo is to re-deploy it. It takes a few steps, but doesn't require migrating your database or anything dangerous like that.

  1. Delete the existing repository and Vercel project (the data will be unaffected since it's in Supabase)
  2. Click 'Deploy' and follow the instillation steps, using your existing Supabase project's details

Contributing

Feel free to look for open issues in this repo and the primo repo. If you find a bug or find yourself needing something from primo that it can't do, please open an issue to start discussion.

If you have any ideas or time to contribute, feel free to open an issue or come talk to us in the primo Discord.