Giter VIP home page Giter VIP logo

vogelino / letterstori.es-raoul-hausmann Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 1010.76 MB

A visualisation of correspondences of Raoul Hausmann πŸ‘¨πŸ»β€πŸŽ¨

Home Page: https://hausmann.letterstori.es

License: MIT License

JavaScript 88.14% HTML 11.70% CSS 0.16%
archive data-visualization correspondence correspondence-analysis museum-collections berlin raoul-hausmann dada letters interactive-visualizations

letterstori.es-raoul-hausmann's Introduction

Letterstori.es β€” Raoul Hausmann

This interactive data visualisation highlights interesting letter exchanges between Raoul Hausmann and other stakeholders. Based on the rich collection of the Berlinische Galerie, the web-based app allows to discover the personal correspondence of the very know Dada artist. From love stories to professional communication, the letters contain many interesting and valuable information about Hausmann and its entourage.

Run the project locally

Clone the repository:

git clone [email protected]:vogelino/letterstori.es-raoul-hausmann.git
cd letterstori.es-raoul-hausmann

Install the NPM dependencies:

npm install

Develop / Run locally:

npm run dev

Develop / Run locally (Storybook):

npm run storybook

Deploy it to the cloud with vercel

vercel

Contribution

Writing components

In React every piece of functionality is written as a β€œcomponent”. Generally we distinguish these into three types:

  1. Presentational
    • are small dump ui components
    • accept data/state via props that can be mocked e.g. for inclusion in React Storybook
    • can have internal state if it has no implications on the outside of the component
    • can use other presentational and utilitary components (but not smart components)
    • examples: Button, Icon, Timeline, Header
  2. Stateful
    • connect and combine presentational components with app state and data providers like Apollo
    • examples: Timeline (takes presentational Timeline component an wires it up with state and data)
  3. Utilitary
    • generic helper components that are not specific for this particular app
    • can theoretically be dragged and dropped into another project
    • examples: LoadingSwitcher (decides on loading between two components depending on a condition)

Component naming and folder structure

We strictly stick to the rule β€œone component per file”. Except of type distinction a flat directory structure is preferred for components. If a presentational component depends on another conponent or is a child component it is aligned on the same folder level but gets its parent component’s name as a prefix:

  • Timeline (parent component)
  • TimelineAxis (is child of Timeline component)
  • TimelineAxisLabel (is child of TimelineAxis)

Presentational components are structured in folders that have an index.js which exports the component along with a styling.js file in it. For all other types just a JavaScript file that is named after the component is needed.

…
β”œβ”€β”€ components
|   β”œβ”€β”€ presentational
|   |   β”œβ”€β”€ Button // component folder
|   |   |   β”œβ”€β”€ index.js // exports the component
|   |   |   └── styles.js // component styling
|   |   OR
|   |   β”œβ”€β”€ Tooltip // component folder
|   |   |   β”œβ”€β”€ index.js // adds inner react state (eg. hovered) and exports the component
|   |   |   β”œβ”€β”€ Button.js // exports the pure/dump/presentational component
|   |   |   └── styles.js // component styling
|   |   β”œβ”€β”€ Timeline
|   |   β”œβ”€β”€ TimelineAxis
|   |   β”œβ”€β”€ TimelineAxisLabel
|   |   β”œβ”€β”€ ComponentName
|   |   └── …
|   β”œβ”€β”€ stateful
|   |   β”œβ”€β”€ Timeline.js // exports the component
|   |   β”œβ”€β”€ ComponentName.js
|   |   └── …
|   └── utilitary
|   |   β”œβ”€β”€ LoadingSwitcher.js // exports the component
|   |   β”œβ”€β”€ ComponentName.js
|   |   └── …
…

Based on adamsoffer/next-apollo-example repository

Data served via a GraphQL Server

An Apollo Graphql server is exposed as a serverless function at the route /api/grapqhl and serves the data of the visualisation.

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.