Git Product home page Git Product logo

split-times's Introduction

Simple Split Times

This is a app for tracking split times for different events. It's built with Remix and Architect. It's deployed to AWS using GitHub Actions.

Development

  • Validate the app has been set up properly (optional):

    npm run validate
  • Start dev server:

    npm run dev

This starts your app in development mode, rebuilding assets on file changes.

Deployment

This Remix Stack comes with two GitHub Actions that handle automatically deploying your app to production and staging environments. By default, Arc will deploy to the us-west-2 region, if you wish to deploy to a different region, you'll need to change your app.arc

Prior to your first deployment, you'll need to do a few things:

  • Create a new GitHub repo

  • Sign up and login to your AWS account

  • Add AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to your GitHub repo's secrets. Go to your AWS security credentials and click on the "Access keys" tab, and then click "Create New Access Key", then you can copy those and add them to your repo's secrets.

  • Install the AWS CLI.

  • Create an AWS credentials file.

  • Along with your AWS credentials, you'll also need to give your CloudFormation a SESSION_SECRET variable of its own for both staging and production environments, as well as an ARC_APP_SECRET for Arc itself.

    npx arc env --add --env staging ARC_APP_SECRET $(openssl rand -hex 32)
    npx arc env --add --env staging SESSION_SECRET $(openssl rand -hex 32)
    npx arc env --add --env production ARC_APP_SECRET $(openssl rand -hex 32)
    npx arc env --add --env production SESSION_SECRET $(openssl rand -hex 32)

    If you don't have openssl installed, you can also use 1password to generate a random secret, just replace $(openssl rand -hex 32) with the generated secret.

Where do I find my CloudFormation?

You can find the CloudFormation template that Architect generated for you in the sam.yaml file.

To find it on AWS, you can search for CloudFormation (make sure you're looking at the correct region!) and find the name of your stack (the name is a PascalCased version of what you have in app.arc, so by default it's SplitTimesA104Staging and SplitTimesA104Production) that matches what's in app.arc, you can find all of your app's resources under the "Resources" tab.

GitHub Actions

We use GitHub Actions for continuous integration and deployment. Anything that gets into the main branch will be deployed to production after running tests/build/etc. Anything in the dev branch will be deployed to staging.

Testing

Vitest

For lower level tests of utilities and individual components, we use vitest. We have DOM-specific assertion helpers via @testing-library/jest-dom.

Type Checking

This project uses TypeScript. It's recommended to get TypeScript set up for your editor to get a really great in-editor experience with type checking and auto-complete. To run type checking across the whole project, run npm run typecheck.

Linting

This project uses ESLint for linting. That is configured in .eslintrc.js.

Formatting

We use Prettier for auto-formatting in this project. It's recommended to install an editor plugin (like the VSCode Prettier plugin) to get auto-formatting on save. There's also a npm run format script you can run to format all files in the project.

split-times's People

Contributors

daryl-sf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.