Code Monkey home page Code Monkey logo

starsirius - Chung-Yi Chi's personal website

starsirius is Chung-Yi Chi's id on PTT (PTT Bulletin Board System, telnet://ptt.cc) as well as the permanent name of his personal website.

The following Quality Attributes and Tradeoffs hold:

  • user latency/load > rapid development > interactive development > SEO adaptibility > rich client abilities > automated deployment
  • All pages must load within 1.5 seconds
  • All pages must be vetted by Heuristics and UI/UX Criteria
  • All actions/operations need to be captured with Cucumber
  • The production site will have a Google PageSpeed score of 90 or higher

Code follows the core practices of The Art of Readable Code

The architecture makes guarantees of:

  • security > stateless > SOLID > data integrity > scaling > streaming
  • Dependency Inversion - changes in lower-levels doesn't affect higher levels
  • Loosely coupled, Highly cohesive
  • Data-centric; low-latency or async data marshaling
  • Program to a thin, clearly defined interface... never a concrete class/implementation
  • Liskov substitution principle
  • Modules are open for extension, but closed for modification
  • The web application and data responsiblities are strongly decoupled
  • Async at a macro level

Usage and Examples

TODO

Installation for development

Install dependencies

PostgreSQL

On OSX Mountain Lion, get Homebrew and do:

brew install postgres

Run the script to create, start and stop the users database:

cd data && sh mk_db.sh

Install virtual env, required Python packages, and star app

sh mk_env.sh

Notes

We followed the steps below to build the site

  • Drop in initial MVC files organized in folders
resource/       # Change the default template and static folder path, need to modify the app config.
    templates/
    partials/
    static/
src/
    star/
        setup.py    # For setuptools to make a package
        development.ini
        star/
            __init__.py
            server.py
            views/
            models/
            lib/
            controllers/
  • Create the mk_env.sh script that will make the virtualenv, install requirements and the project. It will run the following steps:

    1. Install virtualenv

      sudo pip install virtualenv
      

      See the official Flask documentation for more information of virtual environment.

    2. Create a virtual environment named starenv

      virtualenv starenv
      
    3. Activate the virtualenv and install requirements

      source starenv/bin/activate
      pip install -r requirements.txt
      
    4. Install the project egg as a "develop egg"

      We use setuptools to make a package. Make sure the setup.py is configured correctly. See an example.

      cd src/star
      python setup.py develop
      
  • Drop in HTML5 Boilerplate templates for HTML templates

    See the official HTML5 Boilerplate website for more information.

  • Set up postgres database, Flask-SQLAlchemy, SQLAlchemy, and psycopg2 driver. Write SQLAlchemy model classes.

  • Set up database migrate environment with alembic

    See the official alembic tutorial for more information.

Change log

TODO

License

TODO

Chung-Yi Chi's Projects

antigravity icon antigravity

Mock Gravity servers and fixture data from the Gravity API.

aprb icon aprb

Artsy public radio notifications in Slack.

aprd icon aprd

Artsy's Real-time Slack Notification Service (aka Artsy Public Radio)

artsy-passport icon artsy-passport

Wires up the common auth handlers for Artsy's http://ezeljs.com based apps using http://passportjs.org.

bourbon icon bourbon

A simple and lightweight mixin library for Sass.

capybara icon capybara

Acceptance test framework for web applications

crystals icon crystals

Beautiful Demo - http://starsirius.github.io/crystals/

danger icon danger

Stop saying "you forgot to …" in code review

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.