Skip to content

Website that summarizes Swedish parties programs to make it easier to find out what changes they want to make.

Notifications You must be signed in to change notification settings

Ackuq/partiguiden

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Partiguiden - Party information and parliament data made accessible

Partiguiden is a website created with the purpose of making information about the political climate in Sweden as accessible as possible.

Table of contents

  1. Tools used
  2. Development
    1. Prerequisites
    2. Environment variables
    3. Running
    4. Linting and formatting
  3. CI/CD
    1. Continuos integration
    2. Continuos deployment
  4. Deployment environments

Tools used

  • React.js - Javascript framework for developing web apps.
  • Next.js - React.js framework for developing server rendered apps.
  • Vercel - For deployments

Development

In this section, information on how to set up and contribute to the project will be presented.

Prerequisites

  • yarn - Package manager
  • vercel-cli - (optional) Used for interacting with the vercel project

Environment variables

To easily get started with the bare minimum environment variables to get started, a file .env.example is provided in this project. This configuration allows you to interact with the beta version of the backend. To copy this config, run:

cp .env.example .env

Alternatively, if have an authenticated vercel-cli and have access to the project, you can get a complete copy of the development environment configuration by running:

vercel env pull

Running

If you have access to the vercel project, you may use the following command to make use of serverless functionality:

yarn start # Runs the command `vercel dev` (https://vercel.com/docs/cli#commands/dev)

If you don't have access to the vercel project, you can run using Next's development mode using:

yarn start-dev # Runs the command `next dev` (https://nextjs.org/docs/api-reference/cli#development)

Linting and formatting

This project uses ESLint and Prettier for code linting and formatting. The configuration for ESLint can be found in the file .eslintrc and for Prettier in the file .prettierrc. To check linting and formatting of the project, run the command:

yarn lint # Will run the commands `tsc` for type checking and `eslint` for linting and code formatting

CI/CD

This project used Github Actions for continuos integration and a Vercel integration for continuos deployment.

Continuos integration

The Github Actions workflows can be found in the directory .github/workflows/. The purpose of these workflows is to run tests and ensure that the files abide by the linting and code formatting configurations.

Continuos deployment

This project uses Vercel for continuos deployment. Beside from the production and beta environment, deployments are also made for every incoming PR, these will be deployed to a separate automatic generated domain using Vercel's Preview configuration. New features should be tested within the preview environment before added to the beta branch.

Deployment environments

Environment Branch Domain Notes
Production main partiguiden.nu User facing version of the website
Beta develop beta.partiguiden.nu Environment for testing new features / improvements
Preview PR branches - Environment that is used for incoming PR's, will deploy to an automatic generated url, hosted on Vercel

About

Website that summarizes Swedish parties programs to make it easier to find out what changes they want to make.

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •