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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Issues Apache License Circle CI Coveralls Codacy Requires 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

Table of Contents
  1. About The Project
  2. Getting Started
  3. Proper Commit Message
    1. Connect Jira with GitHub Commits
  4. Workflow
  5. Roadmap
  6. Contributing
  7. License
  8. Contact
  9. Acknowledgements

About The Project

Product Name Screen Shot

The manual way of processing transactions in the barangay is still prevalent today. Filling out necessary records by using pen and paper that are stored in log books and folders in the barangay. 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 to provide a systematic, efficient, and technological way of handling online document issuing and more secure data.

Built With

Getting Started

The steps are organized to Run, Develop and Test the application. Make sure you followed the installation steps properly before asking for help.

Prerequisites

There are two things you need to have in order to run this project:

  1. Python 3.9.*
  2. Pip 21.1.*

Application Installation

  1. Clone the repo

    git clone https://github.com/your_username_/Project-Name.git
  2. Go to the project directory

  3. Create and activate a virtual environment (venv)

  4. Install PIP packages

    pip install -r requirements.txt
  5. Copy the environment variables here

  6. Create an .env File and paste the values in step 3

  7. In local-settings.py, change this line:

  8. Create an .env File and paste the values in step 3

  9. In local-settings.py, change this line:

  10. Create an .env File and paste the values in step 3

  11. In local-settings.py, change this line:

    decodedBytes = base64.b64decode("<your-env-value>")

    To the value of GOOGLE_STORAGE_CREDENTIALS in the .env file.

  12. Lastly, run ./manage.py runserver to run the application.

Tools Installation

Before pushing to the develop branch, always test the code locally. In order for this to happen, a set of tools are available for you.

Pre-commit

Once you have run pip install -r requirements.txt, you now have pre-commit. All you have to do now is run two commands.

pre-commit install

After that, you can run pre-commit by running the command bellow:

pre-commit run --all-files

Note: Once you have done pre-commit install, GitKraken will automatically run pre-commit every commit you do.

And then fix any issues that might occur.

CircleCI

Another tool is also available to automatically test and deploy the application in just one push using the CI/CD tool known as CircleCI.

To run it locally, install the CLI using the steps quoted in the CircleCI Docs.

Install with Snap (Linux)

sudo snap install docker circleci
sudo snap connect circleci:docker docker

Install with Homebrew (macOS)

brew install circleci

Install with Chocolatey (Windows)

For Windows users, we provide a Chocolatey package:

choco install circleci-cli -y

Updating the CLI

circleci update

Configuring the CLI

Before using the CLI you need to generate a CircleCI API Token from the Personal API Token tab. After you get your token, configure the CLI by running:

circleci setup

The set-up process will prompt you for configuration settings. Use the default CircleCI Host.

Validate a CircleCI config

You can avoid pushing additional commits to test your config.yml by using the CLI to validate your config locally.

circleci config validate
# Config file at .circleci/config.yml is valid

For more detailed explanation, please refer to the CircleCI Documentation

Running the Local CLI

After the set-up, there are two things you need to test using CircleCI, the test and build job.

  1. To do this use the code below to run the test job:

    circleci local execute -c local-process.yml -e GOOGLE_PROJECT_ID=<the-env-value> -e GOOGLE_COMPUTE_ZONE=<the-env-value> -e GS_BUCKET_NAME=<the-env-value> -e DJANGO_SECRET_KEY=<the-env-value> -e SERVICE_ACCOUNT=<the-env-value> -e DJANGO_SETTINGS_MODULE=<the-env-value> -e DOCKERHUB_USERNAME=<your-docker-username> -e APP_ENGINE_ALLOWED_HOST=<the-env-value> -e DOCKERHUB_PASSWORD=<your-docker-username> -e BROWSERSTACK_USERNAME=<your-username> -e BROWSERSTACK_ACCESS_KEY=<your-access-key> -e CLOUD_STORAGE_KEY=<the-env-value> -e GCLOUD_AUTH_KEY=<the-env-value> -e  --job <job-id>

    Replace the with test. Once successful, do it again with build.

    Note: Replace the <the-env-value> and <your-docker-credentials> with the actual value without quotations.

    Note: You can get your DOCKER_USERNAME and DOCKER_PASSWORD in Docker Hub. All the other values are available in .env file mentioned above.

  2. Fix any issues that might occur before proceeding.

  3. After that, repeat the steps on Running the Local CLI but this time, change the code at the end from --job test to --job build

  4. Repeat the process until you don't see the error.

  5. Repeat the process until you don't see the error.

GitKraken

To lessen the git problems when working on the project, use GitKraken as a Git UI.

Codacy Sentry.io Deepsource

For Error Tracking and Static Code Analyzers, use Codacy, Sentry.io and Deepsource

Note: You can use Sentry.io to keep track of unexpected errors in Production.

Note: Create an account first using your Student GitHub account and notify the Project Repo Admin to be invited in these tools.

Commit Message

Conventional Commit Message

😼 < Meow! Please use semantic commit messages

< type >[< scope >](issue #): < short summary >

Type: chore, docs, feat, fix, refactor, style, or test. Issue # (required): Issue number of related task in Jira.

Scope (optional): e.g. common, compiler, authentication, core

Summary: In present tense. Not capitalized. No period at the end.

Type Description Alias(es)
revert Reverts a previous commit [U]ndo, Reversion, Reverted, Mistake
fix Bug fix for the user, not a fix to a build script [B]ugfix, Bug-Fix, Hot-Fix, Hotfix
feat New feature for the user, not a new feature for build script Add, Added, Addition, Implementation Implemented
bump Increase version; i.e. updating a dependency [V]ersion, Release
test Adding missing tests, refactoring tests; no production code change Unit, Interoperability, Stage
build Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) Not Applicable
chore Updating grunt tasks etc; no production code change Not Applicable
ci Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) Under Further Consideration
refactor Refactoring production code, eg. renaming a variable Refactoring
style Formatting, missing semi colons, etc; no production code change Styling, Styles, Markup
perf Code change that improves performance Optimizing, Optimization
docs Changes to the documentation Documentation, README, Information, In-Line-Comment
localize Translations update Translate

Connect Jira with GitHub Commits

Smart Commit commands

The basic syntax for a GitHub commit with integration of Jira is as follows:

<type>(<ISSUE_KEY>)[<scope>]: <COMMAND> <short summary> <TRANSITION>

ISSUE_KEY: Issue Key from Jira (e.g. BRGY-189)

COMMAND (When Necessary): ex. #comment and #time

comment
Description Adds a comment to a Jira Software issue.
Syntax <ISSUE_KEY> #comment <comment_string>
Example JRA-34 #comment corrected indent issue
Notes The committer's email address must match the email address of a single Jira Software user with permission to comment on issues in that particular project.
time
Description Records time tracking information against an issue.
Syntax <ISSUE_KEY> #time w d h m <comment_string>
Example JRA-34 #time 1w 2d 4h 30m Total work logged
Notes This example records 1 week, 2 days, 4 hours and 30 minutes against the issue, and adds the comment Total work logged in the Work Log tab of the issue.

1. The values for w, d, h and m can be decimal numbers.
2. The comment is added automatically without needing to use the #comment command.
3. The committer's email address must match the email address of a single Jira Software user with permission to log work on an issue.

TRANSITION (Optional): The values here are #to-do, #in-progress, #qa, and #done.

NOTE!: Transition are the different workflow in Jira which you can find here

transition
Description Transitions a Jira Software issue to a particular workflow state.
Syntax <ISSUE_KEY> #<transition_name> #comment <comment_string>
Example JRA-090 #close #comment Fixed this today
Notes This example executes the close issue workflow transition for the issue and adds the comment '
Fixed this today' to the issue.

For us, the workflow transitions are: #to-do, #in-progress, #qa and #done.

#####Examples:

feat[auth](BRGY-6536): #comment my github jira integration commit #done

The most minimal commit message you can do is:

feat[scope]: my github jira integration commit

Note!: Only do this command when you are doing a commit outside your Jira task.

For more examples, please refer to the commit message examples and for more smart commit examples, refer to the Jira Smart Commit Documentation

Workflow

Once you are done coding the business logic, this workflow will guide you on what to do first before doing a commit.

  1. Run pre-commit.

    pre-commit run --all-files

    Fix the necessary errors that pops up after running this command and after that, proceed to the next step.

  2. Upload the static files you have in Google Cloud Storage.

    python manage.py collectstatic

    The above command will collect all your static files given that you specify your app's static directory in STATICFILES_DIRS.

  3. Run the Django Application.

    For linux

    gunicorn main:app --reload -w 1 -k uvicorn.workers.UvicornWorker

    For Windows

    python manage.py runserver
  4. Run CircleCI (For Linux Users Only).

    circleci local execute -c local-process.yml -e GOOGLE_PROJECT_ID=<the-env-value> -e GOOGLE_COMPUTE_ZONE=<the-env-value> -e GS_BUCKET_NAME=<the-env-value> -e DJANGO_SECRET_KEY=<the-env-value> -e SERVICE_ACCOUNT=<the-env-value> -e DJANGO_SETTINGS_MODULE=<the-env-value> -e DOCKERHUB_USERNAME=<your-docker-username> -e APP_ENGINE_ALLOWED_HOST=<the-env-value> -e DOCKERHUB_PASSWORD=<your-docker-username> -e BROWSERSTACK_USERNAME=<your-username> -e BROWSERSTACK_ACCESS_KEY=<your-access-key> -e CLOUD_STORAGE_KEY=<the-env-value> -e GCLOUD_AUTH_KEY=<the-env-value> --job <job-id>

    Replace with test first and when successful, run it again with build.

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

License

Distributed under the Apache 2.0 License. See LICENSE for more information.

Contact

Prince Velasco - LinkedIn - [email protected]

Project Link: https://github.com/PrynsTag/oneBarangay

Acknowledgements

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