Giter Club home page Giter Club logo

platframe's Introduction

Platframe

Modular platform for structured and scalable frontend development.

Netlify Status

Build and deploy your new project in one go:

Take Platframe for a spin on Netlify

Table of contents

Overview

Platframe is a structured and modular frontend development platform suitable for building both multi (MPA) and single page applications (SPA) that are backend agnostic.

Purpose

To provide a sound development platform with constructs that enhance developer efficiency and tooling that supports the frontend workflow.

This is achieved through the following key objectives:

  • An architecture that is semantic, modular and scalable
  • Consistent patterns for structuring source code and common assets
  • A workflow strategy that facilitates both the development and production phase
  • A component implementation to modularize discrete UI concerns and optimize reuse
  • A collection of defaults that address common markup, style and logic concerns
  • A base template for use as a springboard in new projects

Notes

CSS development methodology and coding style is beyond the framework's purview. The primary concern is not to expose a collection of predefined styles, but rather to allow the preference of the developer/team and requirements of the project to determine the most suitable approach to styling.

As the framework remains minimally prescriptive on the methodology you use for authoring CSS, the usage scope of the class selector is largely a decision you get to make. A notable exception is components, which for consistency should be ID'd with a class as described in the documentation.

Stack

Pug, Stylus and JavaScript

Ulterior functions

Beyond the scope of its core functions, Platframe may also be used as a static site generator or a structural blueprint for new frontends.

Generator

Using the framework as a static site generator lends its core benefits to your project, regardless of size. This facilitates projects with less complex requirements. Put the platform in development mode to start adding content and optionally customize the default template. Refer to Getting started.

Blueprint

Frontend architecture is often an afterthought, resulting in a maintenance burdern down the line. You may be able to avoid this by modelling your frontend's structure on Platframe's architecture. Here's an outline of how your project could benefit:

  • Consistent patterns for asset structuring
  • Facilitates growth as the structure scales predictively
  • Exposes a structural hierarchy that optimizes efficiency through inheritance
  • A modular design that keeps your code DRY
  • Reduce or eliminate dev time spent on architectural decisions

Refer to the section on architecture in the docs for more detail. When using Platframe solely as a blueprint for structuring a new frontend, it becomes largely stack-agnostic. The only prerequisite is that the chosen stack should have sufficient feature parity with the respective language features of Pug, Stylus and JavaScript employed by the framework in order to abide by the requirements of the architecture.

Getting started

1. Prerequisites

  • Node.js  ≥ v8.0
  • NPM  ≥ v5.2
Optional:
  • Yarn
  • Node Version Manager (nvm)

2. Get the source

  • Option 1: npx degit platframe/new my-app
  • Option 2: download the latest release

3. Install

You may run nvm to ensure you use the recommended Node version:

  • cd my-app && nvm use

Install the dependencies:

  • cd my-app && yarn install

Alternatively, setup your VCS as part of the installation run:

  • cd my-app && git init && yarn

If you intend to use .env, remove its .sample extension.
Change the default metadata in package.json to reflect your project.

Develop

Spin up the development environment by running yarn develop
By default, the build will be served at localhost:3000
The build system takes care of transpiling modified sources and triggering client updates

Test

Run your test suite* with npm test
Build, test and serve a production build for inspection with npm run preflight.
In addition to hosting the build on your local machine, the preflight task will also provision a tunneled, public URL for previewing the build outside your local network.

* Currently, only linting for JavaScript is wired to the test task. You are responsible for integrating additional testing mechanisms as required.

Deploy

For an optimized, production-targeted build, run yarn build
You can optionally wire your deployment logic to yarn deploy

Documentation

The documentation can be found at platframe.com/docs

Contributing

Refer to the contribution guidelines on how to get started.


Meta

© 2018 Cygnul. Authored by @gidhon. Released under the MIT license.

platframe's People

Contributors

dependabot[bot] avatar gidhon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

platframe's Issues

Support cursive and fantasy font stacks

Description

Add default font stacks for the cursive and fantasy font styles.

Sub-issue

Font stack naming convention
Platframe does not use the dollar symbol convention [ $ ] for variables.

Currently, the general namespace is kept clean and variable purpose emphasized by using prefixed underscore tokens for color vars. Fonts stacks may be similarly identified using the unused $ prefix convention.

This also ensures that additional user-defined stacks are easily recognizable and won't impede on the unprefixed namespace, reserved for general use.

Solution

$cursives  = 'Font X', 'Font Y', cursive
$fantasies = 'Font A', 'Font B', fantasy

Consistent line endings

Description

When doing cross-platform development, Git and some of its clients have defaults that may modify line endings. To avoid development done on a *nix machine being coerced to CRLF on Windows, consistent defaults are needed.

This also causes ESLint to complain since it has a default rule in favor of LF's.

Solution

Add a root-level .gitattributes with some default rules to enforce consistent line endings.

Environment

  • Platframe version used: 1.1.1
  • Operating System and version: Windows 10, v1709

Expand color scheme meta

Description

The color scheme metadata contained in the comment section in index.styl should include a link to its example/preview page in the documentation and the GitHub handle of the author.

Solution

Something to this effect:

/* 🎨
┃ name: Nebula
┃ example: platframe.com/docs/schemes/nebula/
┃ author: First Last (@username)
*/

@require palette
@require dictionary

Depends on completion of issue #2, #3 in platframe-docs.

Revert BrowserSync "online" flag

Description

To speed up BrowserSync, "online" has been set to false, skipping DNS lookup.
This however disables the "External" address for testing a dev build on another local-network device.

Solution

Revert to the default true

Dual app type targeting + CLI

Description

Introduce a shell utility that will provide the option to scaffold Platframe for use as either an MPA (multi-page app) or an SPA (single page app) development platform. Both application types have their merits, and should be provided for in terms of a coherent architecture and tooling.

Scenario

When Platframe is setup to target a multi-page frontend, a Gulp & Rollup build system is deployed. If the target is an SPA, the appropriate architecutre will be scaffolded with Webpack handling the builds.

Solution

  • Create a "project setup CLI" for Platframe
  • Furnish the CLI with two primary paths: MPA, SPA

This is a cursory overview of the requirements, and will be related to sub-issues for an incremental approach towards delivering this v3 feature.

Related issues
#11

Abstract core attributes of style configuration & expand defaults

Configuration is currently delegated to the respective modules with which scope they are concerned. This can be optimized with a central location from which it can be managed.

In addition, certain elements can benefit from defaults in the way of its size and media query attributes, such as headings. This will allow faster iteration for responsive UI styling.

  • use either root.styl by extension or a new top-level setup.styl in the global partials directory (_) to serve as the central location from which to manage core CSS defaults
  • merge media.styl with the new setup section as described above, removing it from its current location in modules

Stupid Question - Style not syncing with added on page from template

Specify a summary of the issue in the Title above

Description

While using the template, when I add another page and set up styling, it doesnt get added to the html.

Bugs

  • Expected behaviour:
    The style of the page should change as per the the style sheet.
  • Current behaviour
    No change at all

Features

  • Is it sufficiently relevant to Platframe?
    No
  • Describe the feature and motivate your proposal
  • If available, provide links to artwork or a demo/mockup

Solution

Optionally add any of the following

  • Suggest a reason/solution for the bug
  • Your ideas around implementing the feature

Environment

Relevant details about the environment you experienced the bug in

  • Platframe version used:
  • Browser (name & version):
  • Environment (name & version):
  • Operating System and version (desktop or mobile):
  • Link to a live example, or set of steps to reproduce this bug:
  1. 2.1.5
  2. Google Chrome is up to date Version 81.0.4044.129
    3.Yarn
    4.Section four on https://www.chrisconnelly.dev

Improve build tooling & reduce unneeded deps

To further minimize external dependency exposure, retire Grunt in favour of Rollup. Platframe already depends on the latter, and Rollup's plugin ecosystem is mature enough for safe migration.

  • all functional features from v1 should be carried over to the new build system, i.e. convenience path dictionaries etc.
  • create settings.js in the project root to replace the Gruntfile and host the project's native configuration
  • build scripts should run with either Yarn or NPM and context should be inferred from NODE_ENV
  • default root directory input/output names should remain configurable (as in v1: src, dev, prod )

Adding assets

Specify a summary of the issue in the Title above

Description

We need to be able to add assets such as music / video / documents / etc. for the user to download.

Bugs

  • Expected behaviour: Constructs to do that
  • Current behaviour: No constructs to do that

Features

  • Is it sufficiently relevant to Platframe? Oh yeah. It is quite normal for static pages to be able to have a pdf file
  • Describe the feature and motivate your proposal: Please add a folder where these things can be put
  • If available, provide links to artwork or a demo/mockup: Nopes

Solution

Optionally add any of the following

  • Suggest a reason/solution for the bug: An idiom for adding general assets.

icons that appear in development, not production

the Header Icon, Favicon, and Footer Icons appear in development but not in production

Features

  • If available, provide links to artwork or a demo/mockup

Development

image

Production

image

Environment

Relevant details about the environment you experienced the bug in

  • Platframe version used: 2.4.2
  • Browser (name & version): Chrome 98.0.4758.102
  • Environment (name & version): Node v14.19.0
  • Operating System and version (desktop or mobile): Ubuntu 20.04
  • Link to a live example, or set of steps to reproduce this bug:

https://explicatecapital.github.io/

Build system does not sync logic assets

Description

The build system does not currently synchronize logic with build destinations.

Bugs

  • PHP, Python, Ruby etc should be available in the build directory
  • They remain in the source dir

Solution

Extend the sync config to copy logic deps verbatim over to the relevant build dirs.
Use PHP, Python and Ruby as the default langs to be copied; modify as required.

Hi guys!

Specify a summary of the issue in the Title above

Description

Provide a description of the bug / feature you are proposing

Bugs

  • Expected behaviour
  • Current behaviour

Features

  • Is it sufficiently relevant to Platframe?
  • Describe the feature and motivate your proposal
  • If available, provide links to artwork or a demo/mockup

Solution

Optionally add any of the following

  • Suggest a reason/solution for the bug
  • Your ideas around implementing the feature

Environment

Relevant details about the environment you experienced the bug in

  • Platframe version used:
  • Browser (name & version):
  • Environment (name & version):
  • Operating System and version (desktop or mobile):
  • Link to a live example, or set of steps to reproduce this bug:

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.