Git Product home page Git Product logo

me.l-m.dev's Introduction

This is me.l-m.dev, a complete upgrade from an older linear blogging system.

It has been built from the ground up in V using a high performance custom made barebones HTTP web server/framework. This is a self contained site, with zero JavaScript.

How did I do it?

A large amount of templating, messing around with sqlite3, a single threaded picoev event loop, HTTP spec caching/etags, lots of regex, and a lot of thinking.

  1. Three Undocumented Projects And The Three Month Hiatus

    Introduction to me.l-m.dev.

  2. Shipping 700KiBs of compressed HTML isn't viable?

    Implementing pagination and a navbar for me.l-m.dev.

posts

posts

I worked hard to make a nice interface, one which is fast and dynamic, and uses zero JavaScript. I relied a lot on the existing HTTP standard + URLs, to jump you to specific parts of the page and use HTML forms to change content.

Jump links using /?p=00000000## are used extensively by the backend to route the client.

Proper configurable pagination is supported.

safe youtube + spotify embed

yt-embed spotify-embed

YouTube and Spotify embeds are by design, horrible offenders in the amount of JavaScript they ship to clients to perform tracking.

The backend only needs to scrape Spotify servers once, using regex to get the metadata it needs. All media YouTube thumbnails and Spotify media are saved to the primary database for further reads after that.

spotify-cache-db

tags and searching

post-tags

A space separated list of tags can be applied to a post. Inside the search tab at the very top, you can search for these tags and the content within.

The search functionality uses a case insensitive glob query.

  • *.wasm
    • test/helo.wasm
    • file.wasm
  • stas*compiler
    • stas COMPILER
    • stas#0000000comPiler
    • stas is my programming language i implemented in my first compiler

go see for yourself!

  • I created this website for myself in V.
  • I have open sourced it under AGPLV3.
  • Go visit me.l-m.dev.

how to build

Building with V is easy, simply have the V compiler installed on your system and run v . in the root directory of the repository.

You can get a copy of the v compiler here.

running the webserver

The server expects a few things in order to run:

  • Call ./make_init_files.sh to create the following files:
    • data.sqlite with correct schema
    • wal.log for logging
    • backup/ folder for backups
  • The SECRET envvar should be set, and is used in https://<url>/auth.
  • The base_url const in main.v should be changed to point to your website's URL.
  • Optionally, the PORT envvar can be set, but defaults to port 8080.

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.