~jhpotter/fclass

A simple, open-source web app for classified advertisements boards.
Initial commit.

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~jhpotter/fclass
read/write
git@git.sr.ht:~jhpotter/fclass

You can also use your local clone with git send-email.

#fclass

fclass is a simple, open-source web app for classified advertisements boards, inspired by craigslist. It is written using Ruby and Sinatra.

#Dependencies

  • Any C compiler
  • SQLite 3
  • Ruby
  • Bundler

#Setup

$ bundle install
$ bundle exec ruby scripts/migrate-v1.rb

#Usage

First, set the NAME variable to the name of your page:

$ export NAME='example'

Then, create the following pages:

  • views/index.haml — homepage
  • views/moderation.haml — moderation log

They are in the HAML format. Since they inherit from views/layout.haml, you do not have to write a full HTML document; just specify the body.

Next, make a list of allowed keys in keys.txt, one key per line. Keys should be distributed to those who have permission to post on your page, and should be kept secret.

Finally, run the server:

$ bundle exec ruby server.rb

#Miscellaneous

The main database is in database.db and uses the SQLite 3 format. You can inspect it with sqlite3(1), for example.

User-submitted reports are in reports.txt. Each line is a separate report, and each report consists of the ID of the post in question and then the report message, separated by a colon and a space.