theoricus

Tiny MV(C) implementation for client side projects.

About

Theoricus uses simple naming conventions (as you see in rails and many others), with a powerful build system behind it. There's also a naviagation mechanism built to let your free to code your shit instead of handling url's manually.

It's in a very alpha version, use at your own risk.

Have fun. :)

Features

  • Routes system
  • Server-side rendering
  • Generators and destroyers for code scaffolding
  • I/O transitions for all Views
  • Convention over configuration (+)
  • Automagic naviagation mechanism
  • Powerful build system (on top of Polvo)
  • Simplistic JSON-Rest interface for models

Supported Languages

Polvo is the build system behind Theoricus, and so you can use any language it supports - full list here.

Issues

Do not hesitate to open a feature request or a bug report.

https://github.com/theoricus/theoricus/issues

Mailing List

A place to talk about it, ask anything, get in touch. Luckily you'll be answered sooner than later.

https://groups.google.com/group/theoricus

Got your hands into the source? We're here to help you.

https://groups.google.com/group/theoricus-dev

Docs

- [Contributing](https://github.com/theoricus/theoricus/blob/master/CONTRIBUTING.md) - [Showcase](https://github.com/theoricus/theoricus/wiki/showcase) - [Changelog](https://github.com/theoricus/theoricus/blob/master/History.md) - [License](https://github.com/theoricus/theoricus/blob/master/LICENSE)

Installing

npm install -g theoricus

Help

Theoricus help screen.

Usage:
  the [options] [params]
 
Options:
  -n, --new       Creates a new app                                                  
  -g, --generate  Generates a new model, view or controller                          
  -d, --destroy   Destroys a new model, view, or controller                          
  -s, --start     Starts app in dev mode at localhost                                
  -c, --compile   Compiles app in dev mode                                           
  -r, --release   Releases app for production                                        
  -p, --preview   Releases app for production at localhost                           
  -i, --index     Saving indexed version of app using `Snapshooter`                  
  -v, --version   Shows theoricus version                                            
  -h, --help      Shows this help screen                                             
  --url           Use with `-i` to inform a specif url to crawl                      
  --snapshooter   Use with `-i` to pass custom flags to `Snapshooter`                
  --rf            Use with -d [view|mvc] for deleting the whole view folder          
  --src           Use with -n for use a specific theoricus version as a git submodule
  --nogitsub      Use with --src for avoiding automatic git submodule setup          
  --base          Application base directory (in case you're inside it)              
 
 
Examples:
 
  • Creating new app
    the -n <app-name>
    the -n <app-name> --src <gh-user>/<gh-repo>#<repo-branch>
 
  • Generating models, views and controllers
    the -g model <model-name>
    the -g view <controller-name>/<view-name>
    the -g controller <controller-name>
    the -g mvc <controller-name>
       * Models and views names are singular, controllers are plural
 
  • Destroying models, views and controllers
    the -d model <model-name>
    the -d view <controller-name>/<view-name>
    the -d controller <controller-name>
    the -d mvc <controller-name>
    the -d mvc <controller-name> --rf
       * Models and views names are singular, controllers are plural

To scaffold a new working project:

the -n myawesomeapp

It'll produce the following structure, which contains a default page section and 404 Not Found error page:

myawesomeapp
├── README.md
├── package.json
├── polvo.yml
├── public
│   ├── app.css
│   ├── app.js
│   └── index.html
└── src
    ├── app
    │   ├── app.coffee
    │   ├── config
    │   │   ├── routes.coffee
    │   │   └── settings.coffee
    │   ├── controllers
    │   │   ├── app_controller.coffee
    │   │   ├── ovos.coffee
    │   │   └── pages.coffee
    │   ├── models
    │   │   ├── app_model.coffee
    │   │   ├── ovo.coffee
    │   │   └── page.coffee
    │   └── views
    │       ├── app_view.coffee
    │       ├── ovos
    │       │   └── index.coffee
    │       └── pages
    │           ├── container.coffee
    │           ├── index.coffee
    │           └── notfound.coffee
    ├── styles
    │   ├── ovos
    │   │   └── index.styl
    │   ├── pages
    │   │   ├── container.styl
    │   │   ├── index.styl
    │   │   └── notfound.styl
    │   └── shared
    │       └── _bootstrap.styl
    └── templates
        ├── ovos
        │   └── index.jade
        └── pages
            ├── container.jade
            ├── index.jade
            └── notfound.jade

cd myawesomeapp
the -s

Visit the url http://localhost:11235 and you should see a success status.