Skip to content

chrisowen491/tranmere-web

Repository files navigation

Tranmere Web.com

This site is a demo site using Tarnmere Rovers data to demonstrate all sorts of website functionality. It is not meant as a commercial entity, and is purely for fun.

Most functionality is provided using free tools, but the the AWS Backend and DataDog monitoring require paid for subscriptions.

Frontend - Static HTML, JQuery, Saas

Source code for Tranmere-Web.com.

The site is a static site designed to be deployed via cloudflare pages.

Site search is powered by algloia - with pages indexed at build time.

Backend - AWS Serverless

Dynamic elements are powered using a combination of AWS Lambda, AppSync, DynamoDb and Contentful CMS. Builds are executed using GitHub Actions.

Prerequisites

  • Scripts are designed for Linux/Mac
  • Node v18+, NPM

Install

$ yarn

Local Testing/DEvelopment (Using CDK backend)

In a terminal - set Key Env variables

export ENVIRONMENT=local
export CF_SPACE=<<Contentful Space Id>>
export CF_KEY=CF_SPACE=<<Contentful  API Key>>
export AL_SPACE=<<Algolia Space Id>>
export AL_KEY=<<Algolia API Key>>
export AL_INDEX=<<Algolia Index Name>>
$ yarn start

In another terminal make sure AWS SAM is installed. You will need docker runing too.

$ brew tap aws/tap
$ brew install aws-sam-cli
$ sam --version

Set Key Env variables

export ENVIRONMENT=local
export EMAIL_ADDRESS=
export CF_SPACE=
export CF_KEY=
export VERSION=1.0.0
$ yarn local-api

Running Local Acceptance Tests

$ yarn local-acceptance-test

Deployment

Set Key Env variables

export ENVIRONMENT=local
export EMAIL_ADDRESS=
export CF_SPACE=
export CF_KEY=
export DD_KEY=
export VERSION=1.0.0
$ cdk deploy

Deploying Images

$ aws s3 sync ./images s3://trfc-programmes

#https://icomoon.io/#preview-free