Git Product home page Git Product logo

mango's Introduction

Build Status made-with-python GitHub contributors Percentage of issues still open Average time to resolve an issue

Mango

A centralized system for HR Outsourcing companies. Mango allows outsourcing teams to improve their workflow, and increase their productivity,
by streamlining the bulk of hiring process tasks, thus allowing consultants and managers to focus on matching candidates with companies.
Through the use of our mobile client, applicants can apply to specific job postings and monitor the progress of their request (sheduled interviews,
tests, notifications).

Final deliverable for CN 7021

Table of contents

Click here to expand contents

Get Started

Source Code

Start by cloning the repository from github

# Get source code from Github
$ git clone https://github.com/NickMns/mango.git

Branches

master branch is used for development
release branch contains major releases

Sub-projects

The repository contains a total of three (3) different sub-projects.

dir Sub-project Language
mango-api REST API Python (Flask)
mango-win-client Native Windows Client C# (.NET 4.7, WPF)
mango_flutter_app Mobile Client Dart (Flutter)

For intstruction on how to build each sub-project consult sections below.

Sub-Projects

Web API

The REST API application is written in Python (3.6) using the Flask framework and various other Flask extensions for security,ORM & API implementation.

In order to run the Web API locally you need Python (> 3.6) and pipenv for virtual environment management.

# Check python version
$ python --version

# Check if pipenv is already installed
$ pip list

# Install pipenv - skip if already installed
$ pip install pipenv

# Change directory
$ cd mango-api

# Setup virtual environment
$ pipenv install

The python project makes use of dotenv to dynamically load environment variables from a special file named .env
This file is ignored by git as it contains environment specific variables.

# create file .env
$ touch .env

# Use nano or any other text editor to edit the file
$ nano .env

# The file must contain the following entries
export ENV="development"
export FLASK_APP="app.py"
export APP_SETTINGS="config.DevelopmentConfig"
export DATABASE_URL="postgresql://<username>:<password>@<dbstring>/<dbname>"
export SQLALCHEMY_TRACK_MODIFICATIONS="False"
export FLASK_SECRET_KEY="<dev-secret-key>"

More on Database setup later

We can now start our local API and add new features or test existing ones.

# pipenv allows to either start a new shell inside the virtual env or run single commands

$ pipenv shell # Starts a new shell
$ pipenv run <command> # Run single command inside venv

# To run the flask app we can use the built-in command *flask run*
$ pipenv run flask run
Loading .env environment variables…
 * Serving Flask app "app.py"
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

Our API is now running. We can use curl or more specialized API testing tools (e.g. Postman) to send requests.

Database

Mango uses PostgreSQL as its main relational Database. Depending on whether your dev environment is Windows, Linux or MacOS, the process of setting up the Database locally can be quite different, so it's wise to consult the offical documentation for this step.

After you have completed installation of PostgreSQL in your local environment, you have to create the database that will be used by the system.
(the database will be execute the schema migration process).

One final step before we execute the schema migration is to update our .env file, and more specifically our DATABASE_URL env var, so that it points to our newly created database.

The database migration can now start.

# Our API project makes use of SQLAlchemy and Alembic for DB entities and management.
# A special script named manage.py is used to execute all db related operations (migrations, upgrade, downgrade, execution, etc)
$ pipenv run python manage.py db upgrade

If the migration process finishes without errors it will mean that the new local DB has the latest schema defined in the /migration/version dir

WPF Client

In order to build the WPF client you need to have .NET framework 4.7 or newer install along with WPF components for Visual Studio.
The develop/build process is handled primarily through Visual Studio (version 2017 or later) and can only be executed in Windows machines (for now at least).

Flutter Client

The mobile client for Mango is developed using Dart (v2.1.0) and Flutter Framework (v1.0.0). Flutter allows us to use the same codebase for both Android and iOS platforms with only minor tweaks.

To build the project you need the following:

Name Link
JDK Download Page
Flutter SDK Download Page
Dart SDK Download Page (Optional) - Covered by Flutter

As Dart SDK is not mandatory (Flutter contains Dart), we can just need to install JDK and Flutter using the official instruction manuals.
Finally we can install Android Studio (if its not installed).

To check if installation was successfull we can use the following command.

# Run diagnostic for flutter
$ flutter doctor

# Common issues include misplaced %JAVA_HOME% var and wrong version of JDK installed

We are now ready to build the application and deploy it to an emulated device or an actual smartphone.

# Build the app - either for Android os iOS
$ flutter build <apk> OR <ios>

# List available devices
$ flutter devices

# Install application on attached device
$ flutter install <device>

Screenshots

Alt text
Alt text

mango's People

Contributors

nikmons avatar

Watchers

James Cloos avatar  avatar

mango's Issues

API - new endpoint for JWT validation

Validate request sent by mobile client (in case of pre-existing access_token we need to confirm the token is still "fresh" before we proceed to HomePage)

WPF - "Remember me" option during login

Add a simple check box control in login screen that controls auto-login functionality.
When active it stores the JWT token locally so that it can be used by multiple sessions for the same user.
During logout we need to reset it's flag value back to 0

Flutter - Display jobs list

Show all available jobs in a list-style UI control.
(no filtering for now, incremental loading by utilizing server-side paging would be nice)

DB - Skills/Skill requirements module

Design and implement Skills module (quantify/standarize available skills, provide default values and list of values, link with job_postings (1-*).

DB - Customers/Companies module

Keep track of Company Customers and their respecitve employees (as external users of the system).
Consider creating separate resource endpoint (highly customizable)

Flutter - Implement register new user

Allow registration of new users (2 stages).

  1. User enters username & password (+ pwd confirmation)
  2. User enters accounts details (name, age, gender & more)

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.