Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects
user avatar
Yaumi authored
e9a0c90b
History

Digipus

Pipeline Status

pipeline status

coverage report

Table of Contents

Description

Abstract

Digipus is a system application that can accommodate archiving educational material from regional apparatus, academics, and practitioners, and organizing it properly so that it becomes material for increasing knowledge and skills for the community at large.

There are three personas here, Admin, Contributor, and User (General Public). As admins, they monitor contributors and material uploaded by contributors by rejecting or approving uploaded material. As contributors, they can upload a material. And as a user, they can look at the material uploaded by contributor.

Feature

Feature that already in this project.

Admin:

  1. Login/Register as an admin.
  2. Approve/Reject a material.
  3. Configuration category and criteria of material.
  4. Manage contributor.
  5. Manage admin.
  6. Edit profile.

Contributor:

  1. Login/Register as an admin.
  2. Upload a material.
  3. Edit profile.
  4. Look at statistic comments.

User:

  1. Look on a material.
  2. Give comment.
  3. Download or read materials.

Initial Setup

This project uses Python 3 with Django Framework. You need to install the required dependencies prior to building and contributing to the project.

  • Python 3.6 or newer and pip package manager.

    Note: We recommend using virtual environment to isolate project-specific Python packages from system-level packages. You can install and use virtualenv package to create the virtual environment for this project.

  • PostgreSQL.

To verify your Python is installed. Make sure the interpreter can be invoked from the shell. For example, in bash shell (macOS or GNU/Linux-based OS):

$ python3 --version
Python 3.8.2
$ pip3 --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

This project uses PostgreSQL as the database. So, add these lines to .env to setup your local database-related environment variables:

IS_LOCAL=True
DB_NAME=marjinal
DB_USER=postgres      
DB_PASSWORD=postgres
DB_HOST=localhost
DB_PORT=5432

You can adjust DB_NAME, DB_USER, DB_PASSWORD, DB_HOST, and DB_PORT based on your local configuration.

Furthermore, this project utilizes Django's mail engine to send notification email for contributors that're subscribing to new comments on their uploaded materials. The codebase already have a class email configured as a default sender email, but you can use your own too. To do so, please configure your .env to have these values:

EMAIL_HOST_USER=<your-email>@gmail.com
EMAIL_HOST_PASSWORD=<your-email-password>

Note: Be informed that only Google Mail accounts that can be used, since the default SMTP server host & port are Google's.

Your email also have to have Less secure app access turned on. Reference

If you want to use other SMTP server, please configure through env var EMAIL_HOST and EMAIL_PORT.

After you clone this repository, let's make sure you installed all requirements, migrate, and collect static.

pip3 install -r requirements.txt
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py collectstatic --no-input

Running Development Environment

To run the server:

python3 manage.py runserver

You can see the app running by going to http://127.0.0.1:8000/ via your browser.

To run the test:

python3 manage.py test

To see your coverage:

coverage run --include="./*" --omit="manage.py,digipus/*,env/*" manage.py test
coverage report -m

You can load an some initial data with this command:

python3 manage.py loaddata */fixtures/initial.json 

Running Development Environment with Docker Compose

Requires Docker and Docker Compose.

If you have already created a .env file, adjust its content to:

SECRET_KEY=place-your-secret-key-here
IS_LOCAL=True
DB_NAME=marjinal
DB_USER=postgres
DB_PASSWORD=postgres
DB_HOST=db
DB_PORT=5432

Create a .env.db file, fill its content with:

POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=marjinal

To build and run the containers:

docker-compose up -d --build

To run the containers without rebuilding them first:

docker-compose up -d

To stop the containers:

docker-compose down

To run any command related to the DIGIPUS container:

docker-compose exec digipus <command>

For example, to migrate the database:

docker-compose exec digipus python manage.py migrate

To run any command related to the database container:

docker-compose exec db <command>

For example, to run psql:

docker-compose exec db psql -U postgres

Contributors

This repository is one of the projects from the Software Project course.

Contributor: Marjinal x Diskominfo Depok

  • Lecturer : Dr. Ade Azurat
  • Scrum Master: Kemas Khaidar Ali
  • Product Owner: Fadhlillah Zata R.
  • Developer:
    • I Gusti Putu Agastya Indrayana - 1706074940
    • Igor Lestin Sianipar - 1706023372
    • Mika Dabelza Abi - 1706022842
    • Samuel Dimas Partogi - 1706074915
    • Saul Andre Lumban Gaol - 1706023555