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

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

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

Running

You can run the application using the following command:

pnpm 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:

pnpm lint # Will run `eslint` and `tsc` for linting and type checking
pnpm format:check # Checks that formatting is OK

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