1 |
Mouchak |
2 |
======= |
3 |
|
4 |
A Javascript framework for building websites quickly. |
5 |
|
6 |
It aims to provide a visual editing interface to create a website and edit its |
7 |
content, primarily for non-technical users. |
8 |
|
9 |
Under the hood, Mouchak abstracts the content of the website into a JSON |
10 |
structure and uses Backbone model and views to render them dynamically. |
11 |
This makes the site entirely run on the client side and syncs with the server |
12 |
whenever there is a update. |
13 |
This also makes Mouchak quite extensible. The built-in types to represent HTML |
14 |
elements and media and such can be used and extended to build more custom |
15 |
types. |
16 |
|
17 |
Mouchak can also load external JS/CSS files. Any magic that can be done using |
18 |
Javascript and CSS can be easily integrated into Mouchak. Just specify Mouchak |
19 |
the plugin to load and the callback to execute. |
20 |
|
21 |
Additionally, Mouchak can also provide a semantic rich environment. It provides |
22 |
the user to specify tags or keywords with each associated content. To |
23 |
complement it, Mouchak provides an API (filterTags) to get all the related |
24 |
content together. One can easily built a view if this kind of functionality is |
25 |
necessary. |
26 |
|
27 |
|
28 |
How to use it |
29 |
============= |
30 |
|
31 |
Installing |
32 |
---------- |
33 |
Either download this codebase or git clone the repo. |
34 |
|
35 |
**Pre-requisites** |
36 |
|
37 |
You need to have Python, MongoDB, Flask and PyMongo. |
38 |
To install python and mongodb on your platform, please use search engines to |
39 |
find instructions. As they are quite popular softwares, getting help online |
40 |
should not be difficult. |
41 |
|
42 |
To install Flask and PyMongo - |
43 |
> pip install flask pymongo |
44 |
|
45 |
Configuring |
46 |
----------- |
47 |
Configuration of Mouchak consists of configuring which database to use, |
48 |
hostname, port no, title of the website etc. |
49 |
Open up mouchak.conf, edit the file according to your needs, and then save it. |
50 |
Ideally, you should set up seperate db for every project. |
51 |
|
52 |
Running |
53 |
------- |
54 |
Once you have installed all the dependencies, go to the directory where the |
55 |
code is located and type: |
56 |
> python server.py |
57 |
|
58 |
This starts the Mouchak server. You can now point your browser to |
59 |
[http://localhost:5000](http://localhost:5000) |
60 |
|
61 |
This will load up and display the website. |
62 |
To edit the website go to [/edit](http://localhost:5000/edit) |
63 |
|
64 |
|
65 |
The global object for this framework is exposed as the variable M. This can be |
66 |
inspected in the console. |
67 |
|
68 |
The M.filterTags() method takes an array of strings representing the tags to filter. |
69 |
It returns an array of the content objects with the matched tags. |
70 |
|
71 |
|
72 |
How it works |
73 |
============ |
74 |
|
75 |
It takes the content of the site in the form of JSON. The JSON should describe the content |
76 |
(in terms of type like text, audio or image) and also provide the content (in case of text |
77 |
the content is as it is, in case images urls are given). The JSON should also describe the |
78 |
content semantically by giving it tags. |
79 |
|
80 |
Mouchak provides a very simple and easy to use editor to edit the JSON. |
81 |
|
82 |
The framework provides an easy way to pull up related content by just specifying the tags. |
83 |
|
84 |
Backbone models are used to model the content. Different content has different types. |
85 |
Again all types are derived from one base type. |
86 |
Each model has a corresponding view as well. The views manage how the content are rendered. |
87 |
|
88 |
Each page is made of multiple content (content objects). |
89 |
Pages are also modeled in Backbone models and their view is managed via Backbone views. |
90 |
|
91 |
The framework also use Backbone router to handle client side routing. |
92 |
|
93 |
|
94 |
What it uses |
95 |
============ |
96 |
|
97 |
Mouchak uses HTML5 Boilerplate and Bootstrap project as a boilerplate code for the website. |
98 |
Mouchak also leverages powerful libraries like Backbone.js and Underscore.js to manage and render |
99 |
content. This gives more flexibility to the content of the website. |
100 |
|
101 |
|
102 |
Support |
103 |
======= |
104 |
|
105 |
Email to rayanon at servelots dot com / arvind at servelots dot com for any kind of feedback. |
106 |
|
107 |
|
108 |
Issues |
109 |
====== |
110 |
|
111 |
Report issues [here](http://trac.pantoto.org/mouchak/) |
112 |
First, check if your issue is already submitted by anyone else, by clicking on |
113 |
"View Tickets". |
114 |
If your issue is not reported, you can report it by clicking on "New Ticket". |