Hackifieds
An app for viewing and posting classified listings, for Hack Reactor members only.
Table of Contents
Example / Usage
- Three forums/categories currently exist: Rent, Buy, and Hack. Clicking on the category name will show you all listings for that category name.
- Filtering listings by location (for a specific category name) is possible via the filter sidebar.
- Clicking on a listing title will pop open detailed listing info for that particular listing. You cannot see particular details (i.e. email, phone number) until the app has authenticated you via github.
- If you are logged in / authenticated via github, you will be allowed to create a new listing in the category of your choice.
Getting Started
-
Start the MySQL server. Hackifieds will run on MySQL or MariaDB and has been tested on each DBMS:
For Arch Linux, using systemd:
$ systemctl start mysqld.service
For OS X:
$ /usr/local/mysql/bin/mysqld_safe
-
Start up MySQL interpreter. If starting for the first time, create the app's database:
$ mysql -u root
At the mysql prompt:
> CREATE DATABASE hackifieds;
-
Install required package dependencies:
$ npm install
-
Install webpack and run persistent webpack process to transpile/pack as needed when app source files change:
$ npm install -g webpack $ webpack --watch
-
Start the server process from the project root directory:
$ npm start
-
Seed the database tables with sample data set (seed file located at -/hackifieds/db/seed.js):
$ node seed.js
-
Load your github API Key ID and Secret:
$ cp hackifieds/server/auth/github_oauth_sample.js hackifieds/server/auth/github_oauth.js
Replace
your_id
andyour_secret
in github_oauth.js with your github API Key ID and secret. -
Navigate to http:/127.0.0.1:3000 in a browser to access the client app.
Architecture
High Level Architecture
Database Schema
Mysql using Sequelize ORM
API / Endpoints
GET /auth/github
Send authentication request to github
GET /auth/github/callback
Handle authentication return from github
GET /api/listings
Return database Listings table rows (joined with certain fields from Users and Categories tables) to client
POST /api/listings
Receive a listing table row from the client (associated with a specific user) and insert it into database
GET /api/categories
Return database Categories table rows to client
GET /api/auth
Return session to user
GET /api/logout
Destroy the client's current session and redirect client to main page of app
Contributing
Hackifieds was built using waffle.io as the project organization tool. Please visit the gitflow.md for our workflow guidelines.
Questions And Issues
For any issues, please refer to our issues page Please direct any questions regarding Hackifieds to our wiki page
Meta
Project Engineers
Development Team
Scrum Master
Product Owner
License
Distributed under the MIT License