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
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.
The steps are organized to Run
, Develop
and Test
the application. Make
sure you followed the installation steps properly before asking for help.
There are two things you need to have in order to run this project:
- Python 3.9.*
- Pip 21.1.*
-
Clone the repo
git clone https://github.com/your_username_/Project-Name.git
-
Go to the project directory
-
Create and activate a virtual environment (venv)
-
Install PIP packages
pip install -r requirements.txt
-
Copy the environment variables here
-
Create an
.env
File and paste the values in step 3 -
In local-settings.py, change this line:
-
Create an
.env
File and paste the values in step 3 -
In local-settings.py, change this line:
-
Create an
.env
File and paste the values in step 3 -
In local-settings.py, change this line:
decodedBytes = base64.b64decode("<your-env-value>")
To the value of
GOOGLE_STORAGE_CREDENTIALS
in the .env file. -
Lastly, run
./manage.py runserver
to run the application.
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.
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.
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.
sudo snap install docker circleci
sudo snap connect circleci:docker docker
brew install circleci
For Windows users, we provide a Chocolatey package:
choco install circleci-cli -y
circleci update
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.
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
After the set-up, there are two things you need to test using CircleCI, the
test
and build
job.
-
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 withbuild
.Note: Replace the
<the-env-value>
and<your-docker-credentials>
with the actual value without quotations.Note: You can get your
DOCKER_USERNAME
andDOCKER_PASSWORD
in Docker Hub. All the other values are available in.env
file mentioned above. -
Fix any issues that might occur before proceeding.
-
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
-
Repeat the process until you don't see the error.
-
Repeat the process until you don't see the error.
To lessen the git problems when working on the project, use GitKraken
as a Git
UI.
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.
😼 < 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 |
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
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. |
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
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
Once you are done coding the business logic, this workflow will guide you on what to do first before doing a commit.
-
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.
-
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
. -
Run the Django Application.
For linux
gunicorn main:app --reload -w 1 -k uvicorn.workers.UvicornWorker
For Windows
python manage.py runserver
-
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 withbuild
.
See the open issues for a list of proposed features (and known issues) .
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the Apache 2.0 License. See LICENSE
for more information.
Prince Velasco - LinkedIn - [email protected]
Project Link: https://github.com/PrynsTag/oneBarangay