koro

an event time scheduler
git clone https://tilde.team/~marisa/repo/koro.git
Log | Files | Refs | README | LICENSE

README.md (2605B)


      1 # koro
      2 
      3 Koro is a small tool for helping plan events by letting people indicate their available start times. It's written
      4 in [Svelte](https://svelte.dev), stores data in [PouchDB](https://pouchdb.com) and replicates with
      5 [CouchDB](https://couchdb.apache.org). Times are locally displayed in the user's timezone with the help of JavaScript's
      6 `Intl` API and [DayJS](https://day.js.org). CSS is handled with [Tailwind](https://tailwindcss.com).
      7 
      8 ## Get started
      9 
     10 Install the dependencies...
     11 
     12 ```bash
     13 git clone https://codeberg.org/marisa/koro.git
     14 cd koro
     15 npm install
     16 ```
     17 
     18 ...then start the Webpack dev server:
     19 
     20 ```bash
     21 npm start
     22 ```
     23 
     24 Navigate to [localhost:3000](http://localhost:3000). You should see your koro running. The cool thing is that you don't even
     25 need a local database to work on the project - PouchDB works exactly like your own little in-browser CouchDB, and you
     26 can enable syncing with your local CouchDB when you're ready.
     27 
     28 ## CSS class purging
     29 
     30 We use Svelte's `class:classname={condition}` feature, which allows us to toggle classes based on certain circumstances.
     31 However, this means that Tailwind's CSS purging feature will not recognize us as using these classes, and will get rid of
     32 them. To circumvent this, we have to add all classes that we use with `class:classname` to Tailwind's whitelist located
     33 in `tailwind.config.js`.
     34 
     35 ## Syncing with CouchDB
     36 
     37 While this isn't required at all for development (unless you're working on something that regards the app's ability
     38 to sync), it's pretty important when you deploy Koro. That being said, it's very easy to allow Koro to sync with an
     39 external CouchDB instance. Simply put your connection string in the `KORO_COUCHDB_URL` environment variable. The
     40 easiest way to do this is to create a `.env` file, which will automatically be read by Webpack. It would look like this:
     41 
     42 ```text
     43 KORO_COUCHDB_URL=https://user:pass@mycouch.com/koro
     44 ```
     45 
     46 ...where `koro` is the name of your database. That's it! Now Koro's PouchDB will attempt to replicate with your CouchDB
     47 instance. For security, make sure you have a user that is only allowed to access your `koro` database, and set your CouchDB
     48 CORS settings in a restrictive way.
     49 
     50 ## Building and running in production mode
     51 
     52 To create an optimised version of the app:
     53 
     54 ```bash
     55 NODE_ENV=production npm run build
     56 ```
     57 
     58 This builds all required files and puts them into `public/`, which you can then deploy to your static site hosting
     59 service of choice.
     60 
     61 ## Contributing
     62 
     63 You can send patches to ~marisa/patches@lists.sr.ht. Make sure to include a [koro] prefix.
     64 
     65 ## License
     66 
     67 See [LICENSE](./LICENSE.md).