Coder Social home page Coder Social logo

wkrzywiec / classic-den Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1 MB

Simple client and server app for publishing posts

Home Page: https://polite-dune-017443c03.1.azurestaticapps.net

License: MIT License

HTML 4.79% JavaScript 88.69% CSS 0.36% Java 3.87% Groovy 2.28%
azure azure-functions azure-web azure-static-web-apps java java-8 web

classic-den's Introduction

Classic Den

Project submitted to the Microsoft Azure Trial Hackathon. Submission post on the Dev.to.

java html css js azure Azure Static Web Apps CI/CD Functions - main branch License: MIT

classic-den-demo

Classic Den is a simple website that can be used to post any announcement, thought, idea or question. Its style is inspired by the look and feel of classic PC systems.

About

This project was created for Microsoft Azure Trial Hackathon. My main goal was to learn something about the Microsoft Azure services, like Azure Functions or Azure Static Web Apps.

My target was to create a low-cost website which could be used by small communities to post announcements or other information. The main assumption is such a page would have only a few write operations (adding posts), but lots of reads (viewing page with posts).

As a result Classic Den is made of three components:

  • frontend - a simple, framework-less application, written with plain HTML, CSS, and JS. It's served from Azure Static Web App service.
  • backend functions - two Java functions deployed on Azure Functions responsible for adding and removing old posts (after 14 days).
  • this GitHub repository - acts as a source of code for both frontend and backend, but also it's used to store posts. Whenever a new post is created a Java function is committing a change to this repo which triggers a GitHub Action which updates static web app with a new

Components

Here is a diagram of this solution:

classic-den-diagram

Frontend (Azure Static Web App)

The frontend part is built with vanilla HTML, CSS, and JS. No framework was used.

There are only two external dependencies used:

  • BOOTSTRA.386 project - it is a JS and CSS theme inspired by the 1980s DOS. To learn more about it check its official GitHub project page or the documentation with a full demo. If you, like me, are amazed at how it looks please support its creator.
  • jQuery - a very popular library, in this project used to make calls to the Azure Function.

Backend (Azure Functions)

Simple plain Java application with two functions:

  • create new post - an HTTP triggered function used to add a new entry by translating the JSON request into HTML post representation and committing it to this repository (entries.html).
  • remove old posts - a time-triggered function, invoked once per day, which checks for posts that were published more than 14 days from the day there were created.

It's deployed to the Azure Functions via VS Code plugin.

GitHub repository

Source code of frontend and backend services. Also, it stores all posts as HTML representation (in the entries.html file).

Whenever a new entry is added a new GitHub Action is triggered and it deploys all static resources to the Azure Static Web App service. Only after that, an entry will be visible on a website (that's why you need to wait a couple of minutes to see it on a page).

Screenshots

den1 den2 den3 den4 den5

classic-den's People

Contributors

wkrzywiec avatar

Stargazers

 avatar

Watchers

 avatar  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.