Giter Site home page Giter Site logo

snowblog's Introduction

snowblog

Blog engine for Snowdrift. This software is written in Haskell, and licensed under the GNU AGPL, a copy of which can be found in the LICENSE file.

Building this on your own machine

First, install stack and PostgreSQL.

$ git clone https://git.snowdrift.coop/pharpend/snowblog.git
$ cd snowblog
$ stack setup
$ stack build
$ ./sdb.hs devel

Then, visit http://localhost:3000 on your machine.

The test suite can be run with ./sdb.hs test.

Contributing

Anyone is welcome to contribute.

The maintainer is Peter Harpending.

Specification

  • Routes. Here are the non-degenenerate routes (i.e. not /favicon.ico et al)

    / HomeR GET
    /notifications NotificationsR GET
    
    /new/comment NewCommentR  GET POST
    /new/page    NewStaticPageR  GET POST
    /new/post    NewPostR  GET POST
    /new/user    NewUserR  GET POST
    
    /comment/#CommentId      CommentR     GET
    /comment/#CommentId/del  CommentDelR  GET POST
    /comment/#CommentId/edit CommentEditR GET POST
    
    /page/#Text      StaticPageR     GET
    /page/#Text/del  StaticPageDelR  GET POST
    /page/#Text/edit StaticPageEditR GET POST
    
    /post/#Text      PostR     GET
    /post/#Text/del  PostDelR  GET POST
    /post/#Text/edit PostEditR GET POST
    
    /user/#Text      UserR     GET
    /user/#Text/del  UserDelR  GET POST
    /user/#Text/edit UserEditR GET POST
    
  • Models

    Comment json
        author UserId
        text Markdown
        created UTCTime
        comments [CommentId]
    
    Notification json
        target UserId
        text Text
        read Bool
        created UTCTime
    
    Post json
        slug Text
        title Text
        authors [UserId]
        text Markdown
        created UTCTime
        comments [CommentId]
        UniquePost slug
    
    StaticPage json
        slug Text
        title Text
        authors [UserId]
        text Markdown
        created UTCTime
        comments [CommentId]
        UniquePage slug
    
    User
        ident Text
        email Text Maybe
        emailVerified Bool
        emailVerkey Text
        realName Text Maybe
        password Text Maybe
        role Role
        created UTCTime
        UniqueUser ident
    

    A note on Role. It's defined in src/Model/Role.hs as

    data Role = Admin
              | Moderator
              | Contributor
              | Established

    It's an instance of PersistField and PersistFieldSql, so it can be a field in the database. Each role is a superset of the next role. That is,

    • All Admins are Moderators
    • All Moderators are Contributors
    • All Contributors are Established

snowblog's People

Contributors

pharpend avatar

Watchers

James Cloos avatar  avatar  avatar

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.