npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gatsby-theme-direct-democracy

v0.0.4

Published

Expedition Grundeinkommen Website

Downloads

6

Readme

Expedition Grundeinkommen

Frontend for Volksinitiativen Platform for Expedition Grundeinkommen.

Stack:

  • React
  • Gatsby
  • Contentful
  • Wordpress
  • Netlify

Code of Conduct

Here

Development Environment

Install dependencies

npm i

Run dev server

npm start

Dev best practices

Git

You can either rebase when merging if it is important to keep the commits of the pr. When merging pull requests (without rebasing) merge commit messages should have the following structure: Merged #155: Short description

Linting and formatting

A .prettierrc file is included. You can install a Prettier plugin in your text editor, it will automatically detect the .prettierrc. It can be set to format according to these settings on save (in VS Code this is enabled by default).

Integrations

The frontend interacts with Content APIs (run at build time), and with our own APIs, as defined in our backend.

None of the integrations have a local development environment. The development environment gets this data from development instances of the hosted services.

Content services

Content APIS are loaded at build time. Their configurations are defined in gatsby-config.js.

The general pipeline of static data loading and querying in Gatsby is as follows:

  1. Gatsby runs the plugins defined in gatsby-config.js, which queries the content.
  2. Gatsby runs the configuration in gatsby-node.js. This builds the static pages from the content.
  3. useStaticQuery is used in the Layout component in order to get data from the Gatsby data layer.

Contentful

  • Used for static content (pages):
    • A static page has multiple sections
    • All the sections of the different pages are defined in static sites.
    • rich-text-react-renderer can check they type of the content inside of embeds and then conditionally return components for that embedded content.
    • use useStaticQuery when you need to query something that comes from contentful.
    • The Contentful definition contains sections, which get passed to the Section component, which render all the possible configurations of a section.

Wordpress

  • Used for blog posts

API

The API runs on the Serverless Framework, deployed on AWS. The URL for accessing the API is configured in aws-config.js, which uses the dev or prod endpoints depending on the environment variable.

Use the endpoints like this:

import CONFIG from '../../../aws-config';

const url = `${CONFIG.API.INVOKE_URL}/analytics/signatures`,

fetch(url, {...});

User Management

  • Handled by Cognito.
  • Uses Amplify frontend library for connecting to Cognito.
  • Implemented in the Authentication context and the Authentication hook.
  • User table in the database is linked to Cognito user database by the cognito id.

Database

  • Uses Dynamo DB
  • Tables:
    • Signatures
    • Users