Skip to content

An e-Government System for Online Transaction Processing through Web and Mobile Application with Implementation of OCR Technologies

License

Notifications You must be signed in to change notification settings

PrynsTag/oneBarangay-REST-API

Repository files navigation

Built with Cookiecutter Django Contributors Issues Apache License Coveralls Codacy Black Isort Checked with mypy pre-commit.ci status Deep Source Deep Source


Logo

oneBarangay

An e-Government System for Online Transaction Processing
through Web and Mobile Application with Implementation of OCR Technologies.
Explore the docs »

View Demo · Report Bug · Request Feature

Note: For old implementation of the project with OCR and Image Processing capabilities, please refer to the old repo.

Table of Contents

About the Project

Product Name Screen Shot

The manual way of processing transactions in the barangay (village) is still prevalent today. Filling out necessary records by using pen and paper that are stored in log books and folders in the barangay (village). There are records which have been distorted, some records are incomplete and there has been a loss of data.

Web application systems and mobile applications have helped in the tasks that we perform on a daily basis. These applications assisted us to make our lives easier in making transactions. With the emergence of technology in the Philippines, the proposed system, which is the oneBarangay system, will handle the main office of the barangay (village) to provide a systematic, efficient, and technological way of handling online document issuing and more secure data.

Features

Screenshots

oneBarngay Admin Screenshot 1 oneBarngay Admin Screenshot 2
oneBarngay Admin Screenshot 3 oneBarngay Admin Screenshot 4
oneBarngay API Screenshot 1 oneBarngay Admin Screenshot 6

Built With đź› 

  • Python - Programming Language
  • Django - The web framework for perfectionists with deadlines
  • Django REST Framework - A powerful and flexible toolkit for building Web APIs
  • Postgres SQL - A relational database management system emphasizing extensibility and SQL
  • Redis - An in-memory data structure store, used as a database, cache and message broker
  • Google Cloud Platform - GCP Storage for storing images and OCR capabilities

Pre-requisites

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installation

  1. Clone the repository
git clone https://
  1. Create a virtual environment
python -m venv venv
  1. Activate the virtual environment
source venv/bin/activate
  1. Install the requirements
pip install -r requirements.txt
  1. Create a .env file and add the following environment variables
DATABASE_URL=postgres://<USER>:<PASSWORD>@<HOST>:<PORT>/<NAME>
REDIS_URL=redis://<HOST>:<PORT>/0
  1. Run the migrations
python manage.py migrate
  1. Create a superuser
python manage.py createsuperuser
  1. Run the server
python manage.py runserver

Running the tests

With Django

python manage.py test

With Pytest

pytest

Deployment

  1. Create a .env file and add the following environment variables
DATABASE_URL=postgres://USER:PASSWORD@HOST:PORT/NAME
REDIS_URL=redis://HOST:PORT/0
DJANGO_SECRET_KEY=<your_secret_key>
DJANGO_ALLOWED_HOSTS=<your_host>
DJANGO_GCP_STORAGE_BUCKET_NAME=<your_bucket_name>
DEFAULT_FROM_EMAIL=<your_email>
DJANGO_ADMIN_URL=<your_admin_url>
SENDGRID_API_KEY=<your_sendgrid_api_key>
SENDGRID_GENERATE_MESSAGE_ID=<your_sendgrid_generate_message_id>
SENDGRID_MERGE_FIELD_FORMAT=<your_sendgrid_merge_field_format>
SENTRY_DSN=<your_sentry_dsn>
  1. Run the migrations
python manage.py migrate
  1. Create a superuser
python manage.py createsuperuser
  1. Run the server
python manage.py runserver

Settings

Moved to settings.

Basic Commands

Setting Up Your Users

  • To create a normal user account, just go to Sign Up and fill out the form. Once you submit it, you'll see a " Verify Your E-mail Address" page. Go to your console to see a simulated email verification message. Copy the link into your browser. Now the user's email should be verified and ready to go.

  • To create an superuser account, use this command:

    $ python manage.py createsuperuser
    

For convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users.

Type checks

Running type checks with mypy:

$ mypy onebarangay_psql

Pre-commit checks

Running pre-commit checks:

$ pre-commit run --all-files

Test coverage

To run the tests, check your test coverage, and generate an HTML coverage report:

$ coverage run -m pytest
$ coverage html
$ open htmlcov/index.html

Running tests with pytest

$ pytest

Live reloading and Sass CSS compilation

Moved to Live reloading and SASS compilation.

Email Server

In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use MailHog when generating the project a local SMTP server with a web interface will be available.

  1. Download the latest MailHog release for your OS.

  2. Rename the build to MailHog.

  3. Copy the file to the project root.

  4. Make it executable:

    $ chmod +x MailHog
    
  5. Spin up another terminal window and start it there:

    ./MailHog
    
  6. Check out http://127.0.0.1:8025/ to see how it goes.

Now you have your own mail server running locally, ready to receive whatever you send it.

Sentry

Sentry is an error logging aggregator service. You can sign up for a free account at https://sentry.io/signup/?code=cookiecutter or download and host it yourself. The system is set up with reasonable defaults, including 404 logging and integration with the WSGI application.

You must set the DSN url in production.

Heroku

See detailed cookiecutter-django Heroku documentation.

Roadmap

See the open issues for a list of proposed features (and known issues) .

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Code of Conduct

Everyone interacting in the OneBarangay project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the PyLadies Code of Conduct.

License

This project is licensed under the terms of the Apache License.

Acknowledgements

  • Cookiecutter Django - A Cookiecutter template for Django projects
  • Django - The web framework for perfectionists with deadlines
  • Django REST Framework - A powerful and flexible toolkit for building Web APIs
  • Django Allauth - Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication.
  • Django Filter - Django Filter is a generic, reusable application to filter querysets based on user selections.
  • Django Storages - Custom storage backends for Django.
  • Django Debug Toolbar - A configurable set of panels that display various debug information about the current request/response.
  • Django Extensions - This is a collection of custom extensions for the Django Framework.
  • Img Shields - Quality metadata badges for open source projects
  • Choose an Open Source License - A guide to choosing an open source license
  • Font Awesome - The web's most popular icon set and toolkit
  • CircleCI - Continuous Integration and Delivery
  • Codacy - Automated Code Review
  • DeepSource - Automated Code Review
  • Sentry.io - Error Tracking
  • Browserstack - Cross Browser Testing
  • Black Code Style - The uncompromising code formatter
  • Pre-commit - A framework for managing and maintaining multi-language pre-commit hooks
  • Coveralls - Test Coverage History
  • isort - A Python utility / library to sort imports.
  • djhtml - A Django template language linter

About the Author

Hello! I am Prince Velasco. I am a Information Technology student with specialization in Web and Mobile Applications. I have passion Full-Stack Development and Data Science.

Disclaimer

This is a work in progress. Any feedback is welcome.

Contact

For any questions, please contact me at this email or in LinkedIn.

Donations

If you found this project useful, please consider donating to help me maintain and improve this project.

About

An e-Government System for Online Transaction Processing through Web and Mobile Application with Implementation of OCR Technologies

Topics

Resources

License

Stars

Watchers

Forks