GithubHelp home page GithubHelp logo

sunnepah / citizenos-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from citizenos/citizenos-api

0.0 3.0 0.0 7.42 MB

CitizenOS API application - https://api.citizenos.com/

License: Other

JavaScript 88.15% Shell 0.13% HTML 0.03% mupad 11.69%

citizenos-api's Introduction

CitizenOS-API

CitizenOS API - https://api.citizenos.com

TOC:

Running locally

Prerequisites

Installing

  • Get the source - git clone [email protected]:citizenos/citizenos-api.git
  • Go to the source directory - cd citizenos-api
  • Install dependencies - npm install
  • Add to dev.api.citizenos.com to your hosts file - sudo -- sh -c -e "echo '127.0.0.1 dev.api.citizenos.com' >> /etc/hosts"
  • Create the DB:
    • NOTE: Do not use this in production, you may want different privileges!
    sudo su -c "createdb citizenos" postgres
    sudo su -c "psql -c \"CREATE USER citizenos WITH PASSWORD 'citizenos'\"" postgres
    sudo su -c "psql -c \"GRANT ALL PRIVILEGES ON DATABASE citizenos TO citizenos\"" postgres
    
    • Create the DB structure - npm run createdb - this test should pass, if it does not or it hangs, you should consult the ./logs/app.log

Running

NOTES:

  • When using over HTTPS you need to add ./config/certs/citizenosCARoot.pem to your trusted CA certificate store or browsers will complain.

Testing

  • You need an instance of citizenos-api and etherpad-lite running before you execute tests.
  • npm test

Debugging

  • By default logs are in ./logs/app.log

Contributing

Pull requests

  • All pull requests to master branch
  • Live site runs on prod branch

Improvement ideas

  • Support different authentication and signing methods so that anyone could add their country specifics. That takes us to modular architecture where ideally I would like to add new methods by installing a module and configuring it.
  • Generic file storage - don't force the use of AWS as a storage. As a starting point local file storage would be nice for "off the grid" deployments.
  • Implement generic "if this, then that" engine where anyone can plug into Topic state changes with their own custom logic. Right now for example Rahvaalgatus.ee has a flow where a signed document is sent to Parliament via e-mail, but this is very region/partner specific.
  • Email layout designing should be much simpler. Right now there is hard-coded CitizenOS layout and special layout for Rahvaalgatus.ee. We may consider using MailChimp or other services so that there is a separate service where mails are designed and sent and for which each Partner pays themselves.
  • ...

citizenos-api's People

Contributors

ilmartyrk avatar tiblu avatar

Watchers

 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.