Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

vixalien/rabbet3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rabbet

Generate small sites from links. The package is not yet well documented so consider this README a quick explainer.

To set up:

  1. Create an account for Google firebase if you don't have one yet.
  2. Create a project and add a web app (Just follow the instructions).
  3. Get a firebase apiKey and replace the one in packages/db/init.js.
  4. Go to either packages/dash or packages/pages.
  5. Install packages with yarn or npm install.
  6. Run the development server with yarn dev or npm run dev.

Repo structure

  • /packages: Contains all the packages of the rabbet monorepo.

Packages

dash

The Rabbet dashboard. This is the endpoint for users to log in and create accounts and pages. Written in Javascript (Node.JS) using the NextJS framework.

db

This package handles all (most atm) the database requests. There is a database adapter/library at /db.js. Uses Firebase although it is important to note that it can be replaced by another service easily. It also provides a login/logout mechanism in /account.

icons

Icons for the rabbet sites. The icon for rabbet is a Carrot (Rabbet, Rabbit, Carrot, Get it?) The original file from which all other were generated from is named original.svg.

pages

This Rabbet page router resolve a url to a pair of user and their page, then return the rendered page as HTML.

render

This package ingests Rabbet pages (as JS objects) then return a beautiful HTML page. This package can support and will soon leverage templates from the templates folder. The default template is called links and resides in it's directory. The metadata.js script is first called to get data (because the file system will not be available as this package will be runned in a browser environment by @dash.) The page.js is used to return the actual metadata of the template and a render function that will be fed the actual page data and return HTML. It is important to note that a template can use any templating engine (React, EJS, etc) as long as it works on the browser.

To add:

  • Better docs.
  • Every template can be a node package so that it's relevant dependencies are installed on runtime.
  • packages/render is not being correctly built and requires it's build artefacts (dist) to be uploaded.
  • Redirect pages in addition to link pages.