GithubHelp home page GithubHelp logo

j-maas / lindyhop-aachen-rust Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 1.01 MB

A website about all things Lindy Hop in Aachen.

Rust 22.53% Elm 74.76% Dockerfile 1.06% CSS 1.64%
elm lindy-hop rust website

lindyhop-aachen-rust's People

Contributors

bytesnake avatar dependabot[bot] avatar

Watchers

 avatar  avatar  avatar

Forkers

bytesnake

lindyhop-aachen-rust's Issues

CI

#2 introduces tests for the admin. They should be run on a CI server.

Introduction page

A page offering information about the organizers, as well as information for first-time dancers.

Admin

  • List events and preview their occurrences.
  • Create new events and locations.
  • Create new occurrences for an event in batch.
  • Update and delete single events, occurrences, or locations.
  • Filter an event's occurrences for deletion. (Investigate whether updating makes sense.)

Investigate newsletter history

It is possible to offer an archive of past newsletters. However, I cannot come up with a compelling use case that justifies this feature.

Why would someone need this?

Investigate porting admin to Rust

Benefits:

  • Share model and data structures
  • Traits allow for more elegant code

Drawbacks:

  • Time and effort
  • Frameworks unstable, might have breaking changes

Filter and batch edit occurrences

The occurrence list should allow batch editing of the occurrences, to set (indiviual) properties on all selected items.

Furthermore, the list should be filterable to facilitate selecting occurrences with certain characteristics.

ReST API

We need an API to CRUD events and locations.

The admin needs to fetch all events (in the future possibly paginated), and CUD individual events, occurrences, and locations, as well as batch-create occurrences.

Transfer Protocol Proposal

Events should contain their occurrences. Occurrences should refer to the locations by ids, since there are few locations for many occurrences.

{
    "events": {
        "locations": [
            {
                "id": "1",
                "name": "Chico Mendès",
                "address": "Pontstraße 74-76, 52062 Aachen"
            },
            {
                "id": "2",
                "name": "Sencillito",
                "address": "Alexander Strasse 109, 52066 Aachen"
            }
        ],
        "events": [
            {
                "id": "1",
                "name": "Anfängerkurs",
                "teaser": "Für diejenigen, die Lindy Hop ausprobieren möchten.",
                "description": "Unter Anleitung werden dir die Grundschritte des Lindy Hops beigebracht.",
                "occurrences": [
                    {
                        "start": "2019-04-01T19:45",
                        "duration": 45,
                        "location": "1"
                    },
                    {
                        "start": "2019-04-08T19:00",
                        "duration": 60,
                        "location": "2"
                    }
                ]
            },
            {
                "id": "2",
                "name": "Social Dance",
                "teaser": "Einfach Lindy Hop tanzen.",
                "description": "Hier triffst du viele andere Menschen, die ebenfalls Lust haben, Lindy Hop zu tanzen.",
                "occurrences": [
                    {
                        "start": "2019-04-01T20:30",
                        "duration": 90,
                        "location": "1"
                    },
                    {
                        "start": "2019-04-08T20:00",
                        "duration": 60,
                        "location": "2"
                    },
                    {
                        "start": "2019-04-15T20:30",
                        "duration": 90,
                        "location": "1"
                    },
                    {
                        "start": "2019-04-22T20:00",
                        "duration": 60,
                        "location": "2"
                    },
                    {
                        "start": "2019-04-29T20:30",
                        "duration": 90,
                        "location": "1"
                    },
                    {
                        "start": "2019-05-06T20:00",
                        "duration": 90,
                        "location": "2"
                    }
                ]
            }
        ]
    }
}

Times (e. g. occurrences' start) are given as "yyyy-mm-ddThh:mm" (following ISO 8601). Occurrences are sorted chronologically, the earliest first. Occurrences that lie in the past are not present.

ReST Protocol Proposal

The routes are mounted at /api as events, location, events/<eventId>/occurrences.

Each item is referenced by its id. To prevent race conditions, the id should contain information on when the item was last changed. If an update contains an id with an older timestamp than the current object, then the update should abort and the updater should be notified about that race condition.

Redesign occurrence input

There is no need to differentiate between single- and multi-date inputs. Use the same and simply allow the selection of one or more dates.

Event overview

The default overview is occurence-based. An overview of all events is helpful.

Make admin actions sticky

Stick admin actions such as save and delete to the bottom of the screen, so that they are also visible when there is a long list of occurrences.

Filter occurrences by date

Add query parameters to the API that allow to exclude occurrences from ?before=datetime and ?after=datetime. This allows the admin to offer the user whether all, outdated, or upcoming events should be shown.

Normalize model

The model types should not contain references to other classes. Notably, the occurrence should not contain a location_id. Simply associate the Location with the Occurrence the same way as the Event: (Occurrence, Event, Location)

Newsletter generator

Generate a text for the newsletter at a hidden API point to avoid a lot of repetitive work.

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.