Coder Social home page Coder Social logo

sfosaka's Introduction

SFOsaka

The client and server for the SF Osaka Sister city app. The letters SFO should be pronounced, not said, so it all comes out as one word.

2 Components:

  • Django/Python backend
  • Qt 5.x Android/iOS app

Building and Installing:

Server:

  1. Clone the repo
  2. Get a copy of machine_conf.py from someone
  3. /server% virtualenv . -p python3
  4. /server% bin/pip install -r requirements.txt

You will have to create your machine_conf.py for settings that aren't in settings.py:

  • DEBUG
  • SECRET_KEY
  • STATIC_ROOT (this is only necessary to generate the static files)
  • DATABASES

Database

Setup the 'database'. (The database will depend on your machine_conf.py, but the instructions should be the same)

  1. /server/sfosaka% ../bin/python manage.py makemigrations (should be noop if you're installing for the first time)
  2. /server/sfosaka% ../bin/python manage.py migrate
  3. /server/sfosaka% ../bin/python manage.py syncdb

(On updates, skip makemigrations, since those should be checked in)

Static files

Setup the static files (in this case, only the admin .css files)

  1. /server/sfosaka% ../bin/python manage.py collectstatic

This will place the files in STATIC_ROOT (according to your machine_conf.py)

Backend server (behind apache or nginx)

It should be ready to serve. requirements.txt installs gunicorn, but for localhost serving, django has its own server

  • /server/sfosaka% ../bin/python manage.py runserver

For gunicorn:

  • /server/sfosaka% ../bin/gunicorn -w 4 -b :8001 sfosaka.wsgi:application

(This should be run through apache or nginx)

Front end

We're using nginx. The configuration isn't covered here, but in addition to the standard django configuration, you need to point to the static files. (I'm sure there's a better way)

location /static {
    root <STATIC_ROOT>; #this is the path in from machine_conf.py, minus the 'static' part.
}

Client:

Prerequites: Qt 5.x

  1. Build FJClient. This is the Futomen JSON client. Just some basic HTTP/JSON marshalling
  2. If you have added any translations, run lupdate to add them to the specific languages .tm file, and then run Qt Linguist to add the translation
  3. Build SFOSaka This should be repeated for every client. SFOContext.cpp has the servername in it.
  4. mapbox requires an API key which is not checked in. Until I figure out how to put it in a separate file, you have to edit the MapPage.qml file

Android notes: OpenSSL needs to be built. See the Qt specific note, but I found that the OpenSSL setup more useful to configure.

sfosaka's People

Watchers

Phan Quang Huy avatar

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.