• Stars
    star
    122
  • Rank 292,031 (Top 6 %)
  • Language
    TypeScript
  • Created about 7 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Our Website—The Best One Yet!

The Best smartive.ch Yet!

Setup

Make sure to create an .env.local file in the project root with all the secret env variables which can be found in 1PW under smartive.ch Secret Env Vars.

  1. nvm use 14
  2. npm ci
  3. npm run develop

Contributing

Some of the most important information if you are about to contribute. Enjoy.

Atomic Design

This project uses an variation of the classic Atomic Design with a more intuitive approach to naming. Instead of Atoms, Molecules, Organisms, etc. this project works with the following terminology:

  1. Identity: Herein we define the project’s core brand elements. Typefaces, typography, and colours.
  2. Elements: Defines the project’s smallest reusable parts: Elements. A few well-known examples of elements are things like: buttons, links, inputs, drop-downs etc.
  3. Components: Most blocks on the screen are Components. A Component can be anything that uses at least a few Elements.
  4. Compositions: A Composition is a part that has multiple Components inside it. They define how to Components inside it should behave.
  5. Layout: Abstract collection of design principles. Herein the amounts of white-space, grids and wrappers are defined
  6. Pages: Each Page consists of an arrangement of Compositions and Components.

This is influenced and inspired by How we’re using Component Based Design

Design Systems / Systematized Design

We follow a systematized approach to our UI libraries, following closely the paradigm "Systematize everything!" from Refactoring UI.

Colours, fonts, spacings, shadows, etc. should be defined in the tailwind theme and only these should be used in your declarations.

But also apply some common sense and pragmatism. 😌

Next.js

Next.js is used as a framework, especially for server-side rendering (SSR) and static site generation (SSG). Start a development server with npm run develop. 🚀

Code Quality

Automated Tools

We use a set of tools for a reasonably high code quality.

  1. Prettier for Code Formatting npm run prettier
  2. ESLint for Code Guidelines npm run lint
  3. TypeScript for Static Type Checking (done by Next)

These checks are also run on every merge request, and each of these must pass for the MR to be mergable.

Integration Tests

We render all our pages automatically with Playwright to check for errors.

To run the tests locally make sure the development build is running with npm run develop and then start the tests with npm run test;

PRISMIC CMS

Prismic provides most of our page content and we use their graphql api to get it. For typesafety we can generate the types for our queries with npm run prismic:generate. Just make sure beforehand, that you have replaced #INSERT_PRISMIC_TOKEN inside codegen.yml with the valid prismic api token. The generated types can then be found at src/types/generated/prismic.d.ts.

Conventions

Four Eye Principle

The default main branch is protected and nobody can commit to it. Every feature or bugfix is done in a separate Merge Request, which needs to pass the automated tests and needs to be reviewed by another developer.

NO SELF-MERGES 😜

Naming Conventions

Since we're using an automated release tool (see Releases & Deployment) our Merge Requests need to have a common naming pattern:

type(SCOPE): MESSAGE.

eg. feat(SMRTVCH-123): Add Profile Image Upload for Users.

For simplicity we use the ticket number as a scope, otherwise we skip it (feat: Message.). The following types exist:

feat: A new feature
fix: A bug fix
docs: Documentation only changes
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
refactor: A code change that neither fixes a bug nor adds a feature
perf: A code change that improves performance
test: Adding missing or correcting existing tests
chore: Changes to the build process or auxiliary tools and libraries such as documentation generation

Architecture

This is a React app with server-side rendering provided by Next.js.

Deployment Model

We follow loosely the Gitlab Flow. All our Merge Requests are merged against our default branch main and are automatically deployed to our production system on Vercel.

More Repositories

1

zitadel-net

Authentication / Authorization library for zitadel (zitadel.com), written in dotnet for the asp.net web application package.
C#
66
star
2

kuby

"kuby" is a command line tool, written in Rust that helps with kubernetes managment.
Rust
52
star
3

giuseppe

A controller routing system for expressJS with TypeScript decorators and annotations
TypeScript
47
star
4

zitadel-rust

An implementation of the ZITADEL gRPC API in Rust. Complemented with other useful elements such as ServiceAccount auth.
Rust
43
star
5

proc-that

proc(ess)-that - easy extendable ETL tool for Node.js. Written in TypeScript.
TypeScript
36
star
6

zitadel-dart

Dart library for Zitadel, contains gRPC and API access elements.
Dart
21
star
7

es-model

TypeScript
15
star
8

zitadel-node

ZITADEL SDK for Node.js
TypeScript
15
star
9

xstate-test-toolbox

This package contains the helper createTestPlans which can be used with `xstate` and `@xstate/test`.
TypeScript
12
star
10

semantic-release-image

Docker image with semantic-release and plugins installed so you can just put the `releaserc` file into your repo.
Dockerfile
9
star
11

docker-nutch-elasticsearch-mongodb

Docker Image for Apache Nutch, Elasticsearch and MongoDB
Shell
8
star
12

react-shared-code-example

Example repository of shareable code between a React Native and a React App.
JavaScript
6
star
13

SmartiveHandlebarsBundle

Bundle to integrate Handlebars templates into your Symfony2 / Symfony3 application
PHP
6
star
14

stencil-nextjs-example

This project shows how we got Stencil Web Components working inside the Next.js app directory.
TypeScript
6
star
15

generator-k8s

Yeoman generator for kubernetes deployments.
JavaScript
5
star
16

node-application-config

package to provide application config with local config and environment support
TypeScript
4
star
17

generator-giuseppe

Generator for giuseppe powered web applications
JavaScript
4
star
18

techtalk-integration-tests-postman

Small demo-api to show (automated) integration tests with postman and newman
JavaScript
3
star
19

proc-that-rest-extractor

Extractor for proc-that. Loads items from REST APIs
TypeScript
3
star
20

smartive-core

.net core library for your everyday work. contains helpers, additions and useful extensions
C#
2
star
21

docker-php-fpm-symfony

Shell
2
star
22

proc-that-elastic-loader

Loader for proc-that. Loads processed items into an elasticsearch index.
TypeScript
2
star
23

tslint-config

TSLint configuration based on Airbnb's styleguide
2
star
24

hosted-database-operator

Kubernetes operator that provides and orchestrates databases on database servers
C#
2
star
25

react-pwa-toolbox

Toolbox containing various helpers for creating PWA's with React.
TypeScript
2
star
26

docker-restricted-site-proxy

JavaScript
1
star
27

giuseppe-swagger-plugin

Giuseppe Swagger Plugin
TypeScript
1
star
28

graylog-ts

Provides a class for logging with graylog. Written in TypeScript
TypeScript
1
star
29

flutter_pdfium

This is a PDF library for flutter that uses PDFium under the hood. Contains the FFI C/C++ bindings.
C
1
star
30

kustomize-image

Dockerimage with kustomize and git built in.
Dockerfile
1
star
31

flutter-generic-dropdown-widget

A generic dropdown that can show arbitrary content with an arbitrary dropdown toggle.
Dart
1
star
32

semantic-release-lerna

semantic release plugin to publish packages with lerna
JavaScript
1
star
33

generator-react-app

1
star
34

flutter-design-system-generator

Generator for Flutter projects to use design system tokens in dart code.
Dart
1
star
35

fluorflow

MVVM framework for Flutter applications
Dart
1
star
36

graphql-magic

Model-first GraphqlAPI API (and much more) generator
TypeScript
1
star
37

swiss-qr-bill-decoder

A simple tool to decode QR codes of Swiss QR bills
Rust
1
star