Taskrr - a Task Sourcing Web Application
Module Project for CS2102, NUS School of Computing
This web application is in the top 10 over 44 projects for CS2102, AY17/18 Semester 2.
It is a task matching application (e.g., https://www.taskrabbit.com) to facilitate users to hire temporary help to complete certain tasks.
Tasks are general chores as such washing a car at Kent Vales car park on Sunday or delivering a parcel on Tuesday between 17:00 and 19:00.
Users of this application are either looking for help to complete some task or bidding to complete some freelance task. The application provides templates for generic common tasks to facilitate task requesters to create new tasks.
The successful bidder for a task is chosen by the task requester. Each user has an account, and administrators can create/modify/delete entries.
AND MORE !!!
- User authentication
- Tasks/Offers by user
- Error catching and handling
- Landing page
- Categories page that lists all categories
- Tasks page that lists all tasks
Refer to here for the documentation for the Database Schema and ER diagram.
Note: This app requires at least npm version 8 due to async functions. This app uses NodeJS. Install NodeJS via your terminal with
sudo apt-get install nodejs sudo apt-get install npm
or download from:
initialise your setup by running
$ npm install
By default, the application will read your
.env file for the following parameters:
DB_HOST=____ DB_USER=____ DB_PASS=____ DB_PORT=____ DB_DATABASE=____ SESSION_SECRET=____
.env with the details of those particulars to run the application
- Start a psql server at:
Restart the Postgres service (method depends on OS)
Enter the development database name, password and user in a
.envfile in root in the following format:
DB_HOST=localhost DB_USER=root DB_PASS=____ DB_PORT=5432 DB_DATABASE=cs2102 SESSION_SECRET=thisapplicationisthebest_ohohohohohoohoho
If SSHing to a remote database, add in the below variables to the
REMOTE_HOST=<<The remote host URL>> REMOTE_DEST_PORT=<< The remote port number>>
NOTE: The application by default uses the same password for SSHing as your
DB_PASS entered above.
NOTE: If not using a remote database, comment out the relevant parts (highlighted in
app.js) or app will fail to run.
Running the application
Go to the root of the folder (where app.js is) and type
$ node app.js
By default, app will run on
localhost at port
From your browser, you can access the app at:
The tests are only applicable for the SQL functions, and can only run with Python.
1. Install the Python's dependencies:
pip install -r requirements.txt
2. Create a
pytest.ini file in
test/ in the format:
[pytest] env = IP_ADDR=____ SSH_USERNAME=____ SSH_PASSWORD=____ DATABASE=____ DB_USERNAME=____ DB_PASSWORD=____
3. Run the test with
pytest -c test/pytest.ini -v -s
-c: use a
-v: show all test functions, not just filenames.
-s: show all stdout by in the tests.
- Platform: node
- Framework: express
- Testing Framework: pytest
- Continuous Integration Platform: Semaphore CI
- Template Engine: ejs
- CSS Framework: bootstrap
- CSS Preprocessor: css
- Database: postgresql
- Authentication: passport, bcrypt