All Projects → cvut → fittable

cvut / fittable

Licence: MIT License
Calendar display application built on top of the Sirius API.

Programming Languages

javascript
184084 projects - #8 most used programming language
SCSS
7915 projects
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to fittable

Timespace
A jQuery plugin to handle displaying of time events
Stars: ✭ 27 (+3.85%)
Mutual labels:  timetable
kcl-timetable
Utilities in Python3 to fetch the KCL Timetable for a user, or export it as iCalendar (*.ics for Google or Apple)!
Stars: ✭ 14 (-46.15%)
Mutual labels:  timetable
OpenUntis
An alternative FLOSS android client for the Untis timetable system
Stars: ✭ 13 (-50%)
Mutual labels:  timetable
edupage-api
A python library for accessing your Edupage account
Stars: ✭ 40 (+53.85%)
Mutual labels:  timetable
KNURE-TimeTable
🎓 iOS приложение для просмотра расписания ХНУРЭ
Stars: ✭ 21 (-19.23%)
Mutual labels:  timetable
sirius
Modern coffeescript/javascript framework
Stars: ✭ 20 (-23.08%)
Mutual labels:  sirius
python-ical-timetable
Python 生成 ics 格式的大学生课表,支持自定义课程周数和其他信息,支持定义教室 GPS 等信息
Stars: ✭ 49 (+88.46%)
Mutual labels:  timetable
TimeTable
Timetable is an Android App for students.
Stars: ✭ 40 (+53.85%)
Mutual labels:  timetable
timetable
Bus Timetable app React Native
Stars: ✭ 61 (+134.62%)
Mutual labels:  timetable
sirius-kernel
Provides common core classes and the dependency injection microkernel powering all SIRIUS applications
Stars: ✭ 30 (+15.38%)
Mutual labels:  sirius
renfe-cli
python CLI for fast Spanish Renfe timetables retrieval - now with selenium
Stars: ✭ 29 (+11.54%)
Mutual labels:  timetable
conference-app-2017-ios
The Conference App for builderscon tokyo 2017
Stars: ✭ 20 (-23.08%)
Mutual labels:  timetable
ranepa timetable
Custom RANEPA mobile client on Flutter
Stars: ✭ 39 (+50%)
Mutual labels:  timetable
snutt
SNU Timetable
Stars: ✭ 38 (+46.15%)
Mutual labels:  timetable
sirius
SIRIUS is a software for discovering a landscape of de-novo identification of metabolites using tandem mass spectrometry. This repository contains the code of the SIRIUS Software (GUI and CLI)
Stars: ✭ 32 (+23.08%)
Mutual labels:  sirius
dtd2mysql
MySQL / MariaDB import for DTD feeds (fares, timetable and routeing)
Stars: ✭ 25 (-3.85%)
Mutual labels:  timetable
every2cal
🙌에브리타임 캘린더를 ics파일로 바꿔줍니다
Stars: ✭ 33 (+26.92%)
Mutual labels:  timetable
subway-time
A nice NYC Subway time table.
Stars: ✭ 25 (-3.85%)
Mutual labels:  timetable
Timetable
A super simple timetable app
Stars: ✭ 52 (+100%)
Mutual labels:  timetable
TimeTableManager
Simple react application to create a TimeTable based only on your choice of subjects.
Stars: ✭ 30 (+15.38%)
Mutual labels:  timetable

fittable

Travis AppVeyor David

Fittable is new timetable application developed at FIT CTU in Prague. It’s a client-side JavaScript application built on top of the Sirius API, created with an emphasis on modern approach to design and used technology.

Using JavaScript ES6+ code (converting to ES5 using babel) makes fittable ready for new technologies and development trends in JavaScript language.

fittable screenshot

Installation

Requirements

You will need Node.JS or io.js.

You need npm version 2.11 or newer for package scopes support. You can verify this by running:

npm --version

You can update npm by running:

npm install npm -g

Installing dependencies

To install dependencies, just run:

npm install

Building

We use npm scripts to execute common build tasks. Project uses Webpack under the hood for JS and CSS bundling.

Run the main build task with:

npm run build

This will build full and minified source code, transpiles JS files and copy HTML and image assets.

The resulting build is located in dist/ directory:

  • fittable.js is bundle for usage in web browsers (it can be minified depending on build command used),
  • js directory contains transpiled code to ES5 for use in other projects,
  • index.html is an example project with mock-up data.

Alternatively you can use the following tasks individually:

  • npm run build:dev – generates non-minified CSS and JS files
  • npm run build:prod – generates production (minified) CSS and JS files
  • npm run build:npm – transpiles ES6 source files to ES5 with Babel for consumption by other CommonJS packages,
  • npm run build:assets – copies HTML and image files to dist/ directory

Development

Testing

We use tape for unit testing (blue-tape respectively).

Tests are located in src/test.

You can run tests using npm test for plain TAP output, or npm run test:spec for nicer output. There is also an experimental command npm run test:watch to run tests continuously when files change.

Development Server

Run npm start to launch webpack-dev-server with hot reloading.

You can access the running server on http://localhost:8080/

Access Credentials

To access local development instance you need an access token for authentication with backend service (Sirius). The easiest way to get the token is copying oauth_access_token cookie after authorisation with production instance.

Then add following to the .env file (or copy .env.sample in the repository):

OAUTH_ACCESS_TOKEN=<value of oauth_access_token cookie>
OAUTH_USERNAME=<your username>

These variables will be passed as respective cookies by the development server.

See also configuration below.

Configuration

Application behaviour can be controlled via the following environment variables. You can set these variables permanently via .env file, through export in shell or directly when running npm commands. For example:

FITTABLE_SOURCE=sirius npm start

starts a development server using Sirius as a data source.

Environment variables are inlined during build process using Webpack's DefinePlugin, e.g. in the example above, process.env.NODE_ENV gets replaced by "production" in the final bundle, resulting in conditions like "production" === "production" which can be further eliminated through minification.

Configuration Variables

NODE_ENV: When set to production, React debug messages are removed and Redux logging is disabled. Unset by default. Enabled for npm run build:prod (through webpack.production.config.js file).

FITTABLE_SOURCE: Controls which data backend is enabled. Set this to sirius to use actual data from Sirius (requires access credentials). By default, fake data source is used (called faux). Set to sirius for npm run build:prod (through webpack.production.config.js file).

SIRIUS_TARGET: Controls which instance of Sirius should be used for sirius data source By default, staging instance is used. Can be set to production to use production instance, or alternatively the resulting URL can be overriden by global variable (see below). Note that this is currently not set by npm run build:prod, i.e. staging instance is used by default.

SIRIUS_PROXY_PATH: Defines path to the OAuth proxy to access Sirius API, both in development server and production. Set to /api/sirius by default and it is further merged with <base href> in HTML. See below for overriding this in runtime.

OAUTH_ACCESS_TOKEN: Used by development server to set oauth_access_token cookie for Sirius authorisation. See Access Credentials.

OAUTH_USERNAME: Used by development server to set oauth_username cookie. It contains CTU username to load user's personal calendar from Sirius.

OAuth Proxy

Fittable doesn't handle OAuth authorization directly, we use ngx-oauth to handle authorization and token refreshing. It acts as a proxy for the remote API.

The proxy manages following cookies for the client:

  • oauth_refresh_token – Long-lived token (in encrypted form) which is used by the proxy to refresh an access token after expiration. As long this token is set, we assume the user is authorized.
  • oauth_access_token – Short-lived token to authorize requests to the remote API (passed through by the proxy).
  • oauth_username – Username of the associated user, used to bootstrap initial requests.

Proxy needs to be located on SIRIUS_PROXY_PATH. You can override this variable in the generated bundle by setting global variable SIRIUS_PROXY_PATH before bundle initialisation, for example by adding the following to the index.html file (into <head>):

<script>
window.SIRIUS_PROXY_PATH = '/_proxy/api/v1'
</script>

Keep in mind the path is combined with <base href>.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].