Giter Site home page Giter Site logo

appventure-website's Introduction

appventure-website Build Status

[Deployment: docker-compose.yml | registry (website) | registry (api)]

Backstory: The current version of the website uses Jekyll and a submission portal that pushes to Git. However, on our new setup, none of the services should have push access to GitHub, and anyway it is better to move to a proper CMS so that we can add additional sections to the website without Jekyll hackery. Hence, due to my obsession with Go and APIs, here we are.

The AppVenture website is a Go webapp that generates pages out of static templates and JSON data obtained from the API. It also serves the static files in the assets folder.

  • api.go: A thin wrapper to perform requests to the API
  • router.go: Each request path (example: /about) is defined here and a handler in handlers.go is called
  • handlers.go: Each page is "handled" (API request and rendering) as defined here
  • helpers.go: Functions used in templates
  • templatemanager.go: Templating engine manager, loads and provides functions for each template
  • main.go: Glue to bind the layers together and provide a commandline interface

Assets

The stylesheets are written in Sass's SCSS format and complied into a single stylesheet using Grunt. JavaScript is written plain using prototype syntax.

appventure-api

In the api folder is where the resources the API provides are defined. It uses Ponzu to automatically generate an API from the types defined in the content folder.

It also exposes an admin interface at the path /admin/

Development

Requirements:

  • Go
  • Node.js
  • Ponzu (go get github.com/ponzu-cms/ponzu/...)
ORG=$(go env GOPATH)/src/github.com/appventure-nush
mkdir -p $ORG
git clone [email protected]:appventure-nush/appventure-website.git $ORG/appventure-website
cd $ORG/appventure-website
# build CSS
yarn && yarn grunt
# format CSS and HTML
yarn fmt
# build and run website
go get && go build && ./appventure-website -debug
# build and run API
cd api && ponzu build && ponzu run --port 8081

When greeted by the init page in Ponzu (http://localhost:8081/admin/init), configure the following:

  • Site Name: AppVenture
  • Domain: localhost
  • Admin Details:

appventure-website's People

Contributors

cxo05 avatar serverwentdown avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

l-yc

appventure-website's Issues

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.