Giter Club home page Giter Club logo

festapp-server's Introduction

festapp-server

Build Status

Festapp project page: http://futurice.github.io/festapp-server/

  • Install MongoDB and Redis.
  • Install dependencies: npm install
  • When developing locally: node import-data.js
  • Run the project: npm start

The server listens in port 8080 by default. The port can be changed by setting environment variable PORT.

Admin panel

Admin panel for editing artist, event and other info in the database is available at /admin.

API Documentation

Get artists

GET /api/v1/artists

Response

[
  {
    "picture": "public/BadFinance.jpg",
    "quote": "”Having fun! Everyone altogether, let's rock!”",
    "content": "<p>\r\nBAD finance was formed in the early 2011 by three guys, Sakari, Antti and Jari, all working at Futurice Tampere. The band started reheasing at Jari's student dorm in Hervanta but after Futurice office moved into bigger premises the boys got their own band room.</p>\r\n",
    "featured": false,
    "status": "show",
    "founded": 2012,
    "genre": ["Love Metal"],
    "highlights": ["Bad Finance rocked the place at Futurice Christmas Party 2012."],
    "youtube": "https://www.youtube.com/watch?v=xRKzk0tKchE",
    "spotify": "",
    "contact_info": "Generic contact info, ie. email and phone number",
    "press_image": "public/BadFinance.jpg",
    "credits": "Photo: Futurice Oy",
    "place": 0,
    "_id": "53486eaaead3150200ca7919",
    "albums": ["First Album (2012)", "Second Album (2013)", "Third Album (2014)"],
    "members": ["Mike Arvela", "Sakari Hyöty", "Antti Mattila"],
    "name": "Bad Finance"
  }
]

Get Info

GET /api/v1/info

Response

[
  {
    "title": "Frequently Asked Questions",
    "image": "",
    "content": "<p><strong>First question</strong><br><br>A comprehensive response<br><br>Second question<br>A comprehensive response<br><br><br></p>\r\n",
    "place": 7,
    "_id": "53486eaaead3150200ca791a"
  }
]

Get news

GET /api/v1/news

Response

[
  {
    "title": "An example news item number one!",
    "image": "",
    "teaser_text": "This is a teaser text for the news article.",
    "content": "<p>This is the content of the article, HTML formatted to your liking.</p><br><br>\r\n",
    "time": "1970-01-17T08:03:16.129Z",
    "status": "show",
    "_id": "53486eaaead3150200ca791d"
  }
]

Get locations

GET /api/v1/locations or GET /api/v1/locations?type=RESTAURANT

type can STAGE or RESTAURANT

Response

[
  {
    "x": 100,
    "y": 100,
    "width": 100,
    "height": 100,
    "type": "STAGE",
    "_id": "53486eaaead3150200ca791e",
    "name": "Niitty",
    "description": "This is a stage"
  },
  {
    "x": 300,
    "y": 300,
    "width": 100,
    "height": 100,
    "type": "STAGE",
    "_id": "53486eaaead3150200ca791f",
    "name": "Ranta",
    "description": "This is a stage"
  }
]

Get festival

GET /api/v1/festival

Response

[
  {
    "name": "Foo",
    "organizer": "Bar",
    "start_date": "2014-04-17T04:07:26.787Z",
    "end_date": "2014-04-17T04:07:26.787Z",
    "sponsors": [
      "Futurice"
    ],
    "city": "Turku",
    "country": "Finland",
    "coordinates": {
      "lat": 51.503363,
      "lon": -0.1276250
    }
  }
]

Get events

GET /api/v1/events

Response

[
  {
    "title": "Foo",
    "start_time": "2014-04-12T10:00:00.000Z",
    "end_time": "2014-04-12T12:00:00.000Z",
    "location": "Niitty",
    "_id": "53486eaaead3150200ca791e",
    "artists": ["Tapani Kansa"],
    "description": "This is a stage",
    "starred_count": 2
  }
]

Starring events

POST /api/v1/events/:event_id/star

user_id parameter must be set in the POST body. user_id is used to uniquely identify users and one user can star one event only once. event_id is the database id of event.

Service integrations

List of integrated services

Getting localised data

Append lang=<lang> to the request, f.ex. /api/v1/artists?lang=fi

Localisation API

  • GET /api/v1/localisation/:key (key is of format <fieldname>-<value>-<fieldtype>-<lang>)
  • POST /api/v1/localisation/ (Accepts JSON in the form { 'key' : <key>, 'val' : <value>})

festapp-server's People

Contributors

aajanki avatar deiga avatar elnygren avatar farsun avatar flackey avatar hilzu avatar jkarenko avatar josalmi avatar jvah avatar narkkil avatar olliwer avatar phadej avatar samitsal avatar staltz avatar teeaateeuu avatar ttur avatar unfo avatar vvillee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

festapp-server's Issues

Project site

Introduction page for the whole project, with links to app and backend repositories. Static page in Github Pages is enough. More of a design task, actually.

Implement a database

Implement the server to not serve only static content but dynamic content via a database of your choosing. Give some thought on what would be a wise choice tech-wise (mongo versus traditional sql, etc..), what PaaS-services have to offer (from deployment point of view), etc..

Points of interests on the map and info pages

Implement the possibility to add new locations on the map and show information related to the location on a separate page.

Location data could be in the same format as data/stages.json. There should be one info page for each location.

Reduce repetitive code in admin UI

Many pages in admin/partials/*.html have very similar structure with each other. Similarly, the controller definitions in admin/js/controllers.js have repeating sections. These files should be refactored to reduce the repetition.

Implement a "generic festival website"

Think of this as the landing page of a festival that uses the backend to fetch the data. This should at least show some basic information and a schedule. This story should be broken down to smaller stories once the tech choices have been made.

Implement an "admin page" to change dynamic content

A basic CRUD for admins so that they can change data served from the background. Some kind of authentication would be necessary. Think of how this should be done in terms of user handling. One basic admin user that can add more users? More generic approach? This story should be teared down to smaller stories once the suitable tech choices have been done.

Event hotness

  • Analytics based on favourited/starred event by user clients
  • Design decision if clients should send stars to backend or if other kind of analytics should be used

Localisable content

Serve content in language specified in client request, or fall back to default if not available.

Prefill artist data

When the admin adds a new artist in the Admin UI, the server should prefill the artists info by using the /api/v1/lastfm/search/:artist API.

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.