-
Notifications
You must be signed in to change notification settings - Fork 6
Project Overview
- Nginx & uWSGI - serve both Python and static content.
- Django & Postgres - Primary server-side application.
- Django Tastypie - Powers the API, which serves data from both Postgres and Neo4j.
- Neo4j - Stores our textual data.
- Backbone.js with Require - Each section of the website functions as a separate Backbone app, which load common dependencies, such as Models and Collections.
- For other dependencies see
package.json
- Grunt for building CSS
These ends first come together in templates/base.html
. This file loads the Backbone.js app, sets some global variables needed for localization, and tells sub-templates which CSS file they should be loading.
All the other files directly in templates/
are included directly by the Django backend as declared in web/views.py
. If you want to add a new server-level path, you need to edit this file as well as phaidra/urls.py
, of course.
For frontend routing, you will find these paths in static/js/apps/
. Which of these Backbone routers is included and activated depends on the base url of the currently loaded page. See static/js/main.js
for the mappings.
Underscore templates, used by the Backbone app, are available in templates/js/
. Generally speaking, the folder hierarchy in static/js/views/
and templates/js/
map to each other 1:1. You will have no trouble finding the underscore template you seek.
The endpoints powered by Neo4j include:
-
/api/v1/document/
- List of available documents. -
/api/v1/sentence/
- List of sentences. -
/api/v1/word/
- List of words (requires at least one filter, e.g.?lang=grc
).
You will find the corresponding API Resource files for these endpoints in api/
.
The textual API powers several parts of the application, including the Reader and the Lessons.
These API endpoints also map to Backbone collections and models, which are available in static/js/models/
and static/js/collections/
, which the names you'd expect them to have.
-
/api/v1/submission/
- List of submissions a user has made. -
/api/v1/visualization/
- Contains a number of subordinate endpoints for visualizing user knowledge.
These endpoints are used in the user interface to determine
-
/api/v1/grammar/
- Grammar topics, as displayed on /lessons/ in the UI. -
/api/v1/content/
- Learning content, parsed from Markdown into HTML.
These endpoints are used to construct the learning content in /lessons/ in the UI. In combination wit the Textual Endpoints, they are the primary driver of the learning section of the application.
-
/api/v1/user/
- User information, including name, email, and languages they speak and are currently learning.
- Developer tools and workflow
- API
- Neo4j-powered
- Postgres-powered
- Data
- Internationalization
- General information
- Developer tools and workflow
- Project structure overview
- Frontend vs. Backend Templates
- Backbone.js app structure
- Internationalization for JS
- Guidelines for creating content
- Adding a locale to Phaidra
- Postgres Database
- Neo4j
- Django
- "The server"
- Git
- UI