Coder Social home page Coder Social logo

bulletin's Introduction

bulletin

A bulletin board service (like proboards) written in Clojure.

Live demo: www.fed.nu (It's very rough)

Setting up for local development

Install leiningen so that you have the lein command available in your console.

Use environment variables to configure bulletin. A nice way to do this is to create .lein-env in the root directory:

{:database-url "postgres://<dbuser>:<dbpassword>@localhost:5432/bulletin"}

You can also provide :port <Number>, but the default port will be 3000.

Now boot the server:

lein ring server-headless

To force the server to create the database tables and then populate them with seed data, visit http://localhost:3000/reset-db.

The website should now be running on http://localhost:3000.

Misc

  • Using bootstrap v3.2.0
  • Using bootstrap-markdown v2.6.0 (jQuery v2.1.1) Deps on bootstrap 3.1.1 but I'll use 3.2.0 for convenience for now

TODO

  • Add more ON DELETE CASCADE
  • Implement authorization and protect routes with it
  • Add CSRF protection
  • Add tests for authorization rules at the very least
  • Recaptcha community creation
  • Flood protection
  • Users should only be able to edit their posts for a certain duration
  • Find java/clj markdown lib that's compatible enough with markdown.js that also escapes user html like markdown.js does. So far no good.
  • For now I'm disabling buttons that the current user is unauthorized to use so that I can quickly reason about my progress and the look/feel. But I will eventually avoid rendering the buttons completely instead of just greying them out.
  • I'm used to using Hiccup for templating which makes it trivial to share my cancan.clj between routes and templates. However, this is my first time using Selmer and so far my approach of shoehorning can-*-? keys into random objects has been ugly and feels so ad-hoc.
  • I really need to document things like what *current-user* actually looks like. What kind of things can get assoc'd to it. Etc.
  • Reuse views/community layout on www homepage
  • Add profiling per route
  • Add logging
  • Change my custom timestamp Selmer filter to utc which ensures java.sql.Timestamp and any other date representations are represented as utc strings. That way I can just apply {{some_date|utc}} to anything without checking to see if it's a java.sql.Timestamp or a to_json string first.
  • Add pagination to topics and posts
  • Add post permalinking
  • Link "Latest Post" in community/forum views to the last post's permalink instead of just the topic
  • Now that I'm rendering markdown on the client side, my Reply and Edit buttons no longer have to hit the server to get the original post markdown.

And much much more...

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.