Git Product home page Git Product logo

katika's Introduction

Intro

This project hosts the source code of https://katika237.com It is an umbrella of projects that focus show making useful data on Cameroon easily available e.g. on public contracts, tax declaration, incident with focus on the anglophone crisis and Boko haram, incarceration records focus on arbitrary and illegal arrests...

Each sub-project has (or should have) it's own README.md describing specific (non-)technical aspects around it

At its core Katika uses:

  • Python and Django;
  • Bootstrap JS/CSS is also used across projects;
  • AngularJS is mainly used in the Incident project;
  • Plotly is used in the Budget project.

How to get started?

In order to get you started really quick, we have Vagrant to build an VM image packed with all the necessary dependencies, libraries, DB configuration... and even pre-populate some dummy data. This is also a good way for us to enhance our documentation by using Infrastructure-as-Code methodology.

If you never used Vagrant

If you haven't used Vagrant, do not worry. Head to https://www.vagrantup.com/ download and install it. Then after cloning the repo, cd to the root directory and run vagrant up. If everything goes well, a VM will be created, everything installed and Katika running in that VM on port 8000 which will be exposed to your host machine on port 8002. So head to http://localhost:8002

Troubleshooting

  • To change how what port is exposed and, in general, OS stuff, check the Vagrantfile.
  • To see what is installed and how the DB (Postgres) is configured, check install.sh
  • To see/learn how to create dummy data, check populate_db.py
  • To SSH into the VM, use vagrant ssh
  • To destroy the VM for whatever reason, use vagrant destroy

Intermediate

Once you feel comfortable and would like to start playing seriously, get yourself a bit more familiar with Django if you aren't already. You'll probably need to create an admin user with python3 manage.py createsuperuser. Then head to http://localhost:8002/admin and access the management interface. Here is an area where Django really shines.

Where do we think we need help?

  • Katika runs on an extremely tight budget, so we need to squeeze capacity/resource whenever possible. Let us know or just submit proposal on optimization ideas.
  • We think our UX/UI can be improved, so if you have front-end suggestions and would like to contribute, please do not hesitate
  • We are OKish with full-text search using Postgres but we believe some improvements can be done
  • We have a very weak coverage of unit test...not good
  • Finally if you find security issues (vulnerabilities) please reach out directly to tassingremi[at]gmail.com.

Why did we go Open Source?

By giving back to the community, we hope to foster a stronger Dev ecosystem in Cameroon and perhaps also get more contributions.

License

This code is free as in 'free beer'. It would be nice to reference the project when used but it is NOT required.

katika's People

Contributors

2trc avatar gabin-dongmo avatar sanalexis avatar

Stargazers

Wandji Collins avatar Ngadou Yopa avatar Steve Jiekak avatar Fanon Jupkwo avatar  avatar adonis simo avatar

Watchers

 avatar

katika's Issues

Newsletter Subcription

Story

As an internet user, I want to be able to subscribe to a newsletter in order to be informed of the news;

Description

The issue is intended to provide to users a form for their subscription to the platform's newsletter.
The form must:

  • indicate to users the possibility of unsubscribing from the newsletters
  • reassure users about the confidentiality of the data received
  • should be short, easy for users to fill out
  • be attractive
  • be with a binding promise
  • precize the periodicity to create an expectation

Examples

image

image

Applications

The newsletter can be set up for blog articles, or incidents and public tenders.

Generate report

Story

As a publisher, I want to be able to generate report of information
As an administrator, I want to be able to generate report about editors

Description

The editor or administrator must be able to generate the report of certain information. For this he will have to filter the information for a given period, for a defined parameter, aggregate data, in order to print.

Examples

image

Applications

This feature can be implemented for incidents, prisoners,... for editors

Selecting and deselecting records

Story

As an editor, I want to be able to select one, several or all records
As an administrator, I want to be able to select one, several or all editors

Description

The editor or administrator must be able to select records in order to apply a defined action to them.

  • The selection is made by clicking on the checkbox
  • De-selection is done by clicking on an already checked box
  • A checkbox on the line of field labels allows you to select all records
  • Clicking on the checkbox located on the line of field labels allows you to deselect all the fields

Examples

image

Applications

This feature can be implemented for incidents, prisoners , initiatives, makers and fund raising for covide 19 project, Programme details of Cameroon Bugets,... for editors

Sharing information

Story

As an Internet user, I want to be able to share an article with friends in order to let them know about the platform.

Description

Internet users must be able to share with a third party or in a social network account, an article whose theme seems interesting to them. The platform will therefore have to offer several applications (tele gram, whatsapp, facebook, microsoft teams,...) through which the article can be sent

Examples

image

image

Applications

This feature can be implemented for blog posts

Publish information

Story

As a publisher, I want to be able to publish information

Description

Publishers must have a structured space to put information online. The editor must therefore be able:

  • to enter information
  • to format the entered text (font, size, color,...)
  • to apply styles (titles of different levels, etc.
  • to add numbered lists, bulleted list
  • to add links
  • to import images, video or file

Examples

image

The publisher must also have the necessary rights to register new information for published projects (incidents, prisoners, initiatives or makers of the covid 19 project, history of Cameroon, Theses,....).
To add a new prisoner, for example, the editor will have to enter his name, his date of arrest, his date of incarceration, the prison where he is or was detained, the date of release, the name of the judge, etc. ..The platform must therefore offer a create button to add a new prisoner

Example:
image

A creation form with all the fields required to register a new prisoner will therefore be displayed

image

Notice

  • The platform must present a create button for new records and a publish button for new articles
    image

image

  • The platform must give the possibility to the publisher to cancel his action by a "cancel" button

image

Create editor

Story

As an administrator, I want to be able to create an editor

Description

To add a new editor, the administrator will have to enter all the necessary information. The platform must therefore offer a create button to add a new editor

Example:
image

A creation form with all the fields required to register a new editor will therefore be displayed

image

Notice

  • The platform must present a create button for new records
    image
  • The platform must give the possibility to the administrator to cancel his action by a "cancel" button

image

Account Recovery

Story

As a publisher, I want to be able to recover my account
As an administrator, I want to be able to recover my account

Description

If the publisher or administrator has forgotten his access credentials, he must be able to follow a procedure allowing him to access his account.

Examples

image

image

Scrolling News Ticker

Story

As an Internet user, I want to be able to be alerted to urgent and important information of the day by scroll;

Description

It consists to scrolls continuously on a horizontal bar, news that can reflect an emergency or any other information of an important nature

Examples

image

Applications

Scrolling news tickers can be applied on:
It can be used in particular to highlight an incident

  • an attack that took place in a region
  • a disaster or an accident

Delete information

Story

As an editor, I want to be able to delete one, several or all records
As an administrator, I want to be able to delete one, several or all editors

Description

Deletion is an action that should only be permitted by persons with this right. After selecting the record(s) to delete, the editor or administrator should be able to click a delete button

Examples

image

Notice

  • A deletion confirmation interface should appear
  • The editor or administrator must be able to confirm the suppression with an "delete" button
  • The editor or administrator must be able to cancel his action with a "cancel" button

Examples

image

Applications

This feature can be implemented for prisoners, incidents,... for editors

Account access via third-party accounts

Story

As a publisher, I want to be able to access my account via third-party accounts
As an administrator, I want to be able to access my account via third-party accounts

Description

The publisher or administrator must be able to access his account via one of his accounts on other platforms if he wishes.

Examples

image

Infrequent exception thrown when inserting new tender or contribuable

ERROR get_armp_entries connection already closed
Traceback (most recent call last):
File "/opt/katika/venv/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 236, in _set_autocommit
self.connection.autocommit = autocommit
psycopg2.InterfaceError: connection already closed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/katika/tender/management/commands/get_armp_entries.py", line 118, in parse_and_persist
tender.save()
File "/opt/katika/tender/models.py", line 88, in save
super(ArmpEntry, self).save(*args, **kwargs)
File "/opt/katika/venv/lib/python3.6/site-packages/django/db/models/base.py", line 806, in save
force_update=force_update, update_fields=update_fields)
File "/opt/katika/venv/lib/python3.6/site-packages/django/db/models/base.py", line 833, in save_base
with transaction.atomic(using=using, savepoint=False):
File "/opt/katika/venv/lib/python3.6/site-packages/django/db/transaction.py", line 184, in enter
connection.set_autocommit(False, force_begin_transaction_with_broken_autocommit=True)
File "/opt/katika/venv/lib/python3.6/site-packages/django/db/backends/base/base.py", line 411, in set_autocommit
self._set_autocommit(autocommit)
File "/opt/katika/venv/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 236, in _set_autocommit
self.connection.autocommit = autocommit
File "/opt/katika/venv/lib/python3.6/site-packages/django/db/utils.py", line 94, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/opt/katika/venv/lib/python3.6/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/opt/katika/venv/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 236, in _set_autocommit
self.connection.autocommit = autocommit
django.db.utils.InterfaceError: connection already closed

Print information

Story

As a publisher, I want to be able to print a report of information
As an administrator , I want to be able to print a report about editors

Description

After generating a report, the editor or administrator must be able to print it for use

Notice

  • Once the "print" button is clicked, the platform displays the print settings interface
  • The publisher or administrator must be able to cancel his printing using the "Cancel" button

Information Sorting

Story

As an internet user, I want to be able to sort information according to relevant data (date, type or region)

Description

It consists to prioritize information according to relevant data for the user.

Examples

image

Applications

Sorting informations can be applied on:

  1. Covid 19 Makers (https://katika237.com/covid19/producers/)
    image
    The makers can be sorted by type or by region, or by all fields.
  1. Covid 19 Initiatives (https://katika237.com/covid19/initiatives/)
    image
    The initiatives can be sorted by type or by region, or by all fields
  1. Covid 19 Funds (https://katika237.com/covid19/funds/)
    image
    It would be relevant to indicate whether or not the fundraiser is still open (in progress) or not. In this case it would be interesting to add a status field. Fundraisers could then be sorted by status, or by all fields
  1. Incidents project
    image
    Incidents can be sorted by deaths, wounded or missing, or by regions

What is the best way to develop this locally ?

it's better to develop with the vagrant box up or without it at all ? From the doc it seem that the vagrant box is mainly usefull for testing.
But if i run it up and i try to edit source codes in the folder, is it getting updated inside the box automatically ?

2FA Security access account method

Story

As a publisher, I want to be able to access my account using a 2FA Security method
As an administrator, I want to be able to access my account using a 2FA Security method

Description

The platform must offer a second validation step after entering the password. This confirms that it is indeed the publisher trying to connect. The second validation step can be done:

  • either by rescue code generated and saved by the publisher
  • either by sms or voice message

Examples

image

Access rights

Story

As an administrator, I want to be able to assign access rights to an editor

Description

The administrator must define the different access rights (creation, modification, deletion). Thus, he will have to grant each publisher the rights that correspond to the action that the publisher must be able to do in the platform.

Notice

When creating a publisher's account, default access rights must be granted.

Push notifications Subscription

Story

As an internet user, I want to be able to sign up to receive notifications;

Description

A push notification is a small, customizable message delivered directly to a user’s browser, desktop, or mobile device when or after they land on the site.

Examples

image

Applications

The push notifications can be set up for incidents and public tenders.

Search Information

Story

As a publisher, I want to be able to search for a record
As an administrator, I want to be able to search for an editor

Description

The editor or administrator must be able to search on a record. To do this, the platform must indicate the field on which the search will be carried out and thus publisher or administrator can enter the wanted value for this field.

Examples

image

Applications

This feature can be implemented for incidents, initiatives, makers and fund raising or covid 19 project, prisoners, ... for editors

Access to accounts

Story

As a publisher, I want to be able to access my account in order to publish information there.
As an administrator, I want to be able to access my account.

Description

To connect to their account, publishers and administrators must be able to enter their usernames and passwords. It would be interesting to offer users the possibility of memorizing their identifiers for their future connection.

Examples

image

Notice

  • The publisher or administrator must be able to view the password entered in order to ensure that it actually corresponds to the one expected

image

  • It would be interesting to offer users the possibility of memorizing their identifiers for their future connection.
    image
  • The editor or administrator must be able to be notified in the event of an incorrect password or username
    image
  • The platform should only accept valid credentials
    image

Modify Information

Story

As an editor, I want to be able to modify records
As an administrator, I want to be able to modify editor informations

Description

The editor and administrator must be able to modify certain fields of a record. After selecting the record to edit, they should be able to click an "Edit" button

Examples

image

Notice

  • The editor or administrator must be able to confirm the changes with an "update" button
  • The editor or administrator must be able to cancel his modifications with a "cancel" button

Examples

image

Applications

This feature can be implemented for prisoners, incidents,... for editors

Vagrant Setup Issue

image

After setting up the stack, I don't seem to understand why the port forwarding has some issues.

Upon investigation, I noticed that

  • The files aren't copied into the VM
  • There seems to be no process running

Article commentary

Story

As a user I want to be able to comment on an article

Description

Internet users must be able to give their opinion on the articles published. For this they must fill in personal information via a short form and prove that it is not a robot for their comment to be taken into account.

Examples

image
image

Applications

This feature can be implemented for blog posts

Installation Error

Hello Remi, I cloned your repo and I proceed with the installation but I'm having Error (in attached file below).

sucess_install_err

When I reload or close the box and do vagrant up again I'm having this Error Message: This site can’t be reachedThe webpage at http://localhost:8002/ might be temporarily down or it may have moved permanently to a new web address.
ERR_SOCKET_NOT_CONNECTED
with the box running

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.