DotBind is a software engineer's notebook. Capture cool code snippets while browsing the web or track solutions to bugs. Never forget code again.
Check out the web app @ dotbind.io.
- Team Members
- Technology Stack, APIs, and Third-party Tools
- Folder and File Structure
- Setting up your development environment
- Starting up for development
- System Architecture
- Database Schema
- API Endpoints
- React for rendering views and Redux for managing state
- Node.js and Express
- Passport and Github Oauth
- Nodal & Postgres for creating a RESTful API
- Amazon Web Services for deployment
- ElasticSearch
- Ace Editor
- Github's Octodex
- Travis CI, Mocha, and Chai for TDD
- Webpack & Babel for using next-generation JavaScript, today
- AirBnb's style guide
+-------+
|dotBind|
+---+---+
|
+--------------------------+------------------------+
| |
v v
+--+---+ +--+---+
|client| |server|
+--+---+ +--+---+
| |
+----+-----+ +----+-----+
| | | |
v v v v
+-+-+ +--+---+ +--+---+ +-+-+
|app| |chrome| |static| |api|
+-+-+ +------+ +--+---+ +-+-+
| | |
v v v
+-----+-----+ +------+-----+ +-+---+
|Redux/React| |Node/Express| |Nodal|
+-----------+ +------------+ +-----+
The repo is divided into 2 main folders, client
and server
.
Each main folder is divided into respective subfolders.
app
is the container for the Redux/React web app
chrome
holds the html/cs/js and configuration files needed to build the chrome extension.
static
represents a static file server which serves up files inside app
.
api
is the container for the RESTful API server.
- Install dependencies in client/app, server/static, and server/api directories
$ npm install
- Install Nodal. Make sure you use Node v. 5.10.0 using nvm or n. Node versions >= 6.0.0 are incompatible with this project.
$ npm install nodal -g
-
Install PostgreSQL
-
Install ElasticSearch
$ brew update
$ brew install elasticsearch
// you will need java 1.7+ to run ElasticSearch (brew install Caskroom/cask/java)
- Configure ElasticSearch
// Find elasticsearch.yml file:
$ brew info elasticsearch
// Add headers to elasticsearch.yml:
http.cors.enabled : true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: "X-Requested-With,X-Auth-Token,Content-Type, Content-Length, Authorization"
- In your Google Chrome browser, go to chrome:https://extensions, click on 'Developer mode' then 'Load unpacked extension', select the client/chrome folder to run extension in developer mode
- Run ElasticSearch
$ elasticsearch
-
Run Postgres App
-
Run static-file server from server/static directory
$ npm start
- Run API server from server/api diretory
$ nodal db:create // create database
$ nodal db:prepare // wipes database
$ nodal db:migrate // runs progressive command to rebuild tables in database
$ nodal db:seed // seeds database with dummy data
$ nodal s // start server
- Run Webpack watch and build from client/app directory
$ npm run build
- Go to https://localhost:8000
For API Documentation, please see the ENDPOINTS.md file
MIT