Coder Social home page Coder Social logo

cykelvenner's Introduction

Cykelvenner

Where the software delivery life cycle meets the life of cycling.

Development

In separate terminals:

cd frontend && npm install && npm run dev
cargo run

Now navigate to http://localhost:3000.

Requirements

  • npm
  • rust

Using just

A justfile is provided. Install Just and run just --list for a list of available commands.

Architecture

Cykelvenner is split into a distinct frontend and backend. Neither one knows much about the other; the frontend lives in frontend/ and simply knows that its generated assets (HTML pages, JavaScript files, CSS) will be served by some backend, and that the backend will be available at /api/. Similarly, the backend simply serves the files in frontend/dist/ and is blissfully unaware of the visual representation of the data it provides at /api/.

This decoupling allows using completely different languages, paradigms and tools for the job without worrying about one part of the system breaking the other. Additionally, a statically built frontend allows serving assets from a CDN, greatly optimizing time to first byte and massively reducing hosting complexity as the frontend can be hosted from anywhere (CORS permitting).

Frontend

The user-facing parts of the application are built in HTML/TypeScript/CSS using Svelte, a frontend framework with a minimal footprint thanks to its compiler-based architecture. Svelte's compiler is invoked by SvelteKit, a toolkit for lean frontend development which also handles the bundling of assets and provides a hot-reloading dev server for local development. SvelteKit uses Vite under the hood but also provides a file-based routing solution.

Backend

The backend is built with Axum, a web framework designed for simplicity, modularity and ergonomics.

Delivery

The application runs as a Heroku app with only a few lines of configuration in .buildpacks and Procfile.

Goals

The application is an attempted marriage between the Twelve-Factor App and Jamstack. It aims for simplicity, efficiency and safety by leveraging performant, well-designed frameworks, libraries and platforms.

Credits

Svelte + TS + Vite template by dsegovia90.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

cykelvenner's People

Contributors

wonderfulspam avatar

Watchers

 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.