Giter Club home page Giter Club logo

expenses-app-react-ts-gql's Introduction

Sample expenses app using React, TypeScript and GraphQL

Design decisions

Getting started

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.

yarn release --no-ci

Creates a new app release:

Deployment to GitHub Pages using gh-pages branch is handled separately for flexibility and due to gh-pages-plugin/git-plugin issue.

Requires setting GH_TOKEN or GITHUB_TOKEN with public_repo scope in your environment, or in a local .env file.

yarn deploy

Deploys build to GitHub Pages using gh-pages branch.

Code Style

Install Prettier and TSLint support for your editor/IDE.

Roadmap

Codebase

  • Define code style
  • Add component storybook

Data

  • Create GraphQL schema
  • Add sample data loaders

Docs

  • Design decisions
  • Roadmap
  • Contributing

Core

  • Create React app with TypeScript support
  • Setup Apollo GraphQL
  • Setup Material UI
  • Setup routing
  • Setup authentication

Features

Users

  • Login and logout

Expenses

  • View expenses
  • Edit expenses
  • Add expenses
  • Edit categories
  • Add categories
  • Filter expenses
  • View expenses timeline chart
  • View expenses chart by category
  • View expenses using infinite loader

Shared expenses

  • Share expenses with other users
  • View mutual debt chart by user
  • Balance mutual debt

Performance

  • Test load speed
  • Analyze bundle size
  • Load offline using service worker
  • Work offline using GraphQL cache

Testing

  • Test components
  • Test code style
  • Test code quality
  • Test code for security vulnerabilities
  • Test dependencies for security vulnerabilities
  • Test responsive design
  • Test GraphQL queries and mutations with backend

DevOps

  • Add release process
  • Add deployment process
  • Run tests and deployment in CI/CD pipeline
  • Log errors to issue tracker
  • Extend logged errors with session replay data

Settings

We use the same dotenv files as Create React App.

To define permanent environment variables, create a file called .env in the root of your project:

REACT_APP_NOT_SECRET_CODE=abcdef

The .env files should be checked into source control, with the exclusion of .env*.local.

Used environment files

  • .env: Default.
  • .env.local: Local overrides. This file is loaded for all environments except test.
  • .env.development, .env.test, .env.production: Environment-specific settings.
  • .env.development.local, .env.test.local, .env.production.local: Local overrides of environment-specific settings.

The environment is determined by NODE_ENV variable. The basic Yarn commands use different environments by default. Files on the left have more priority than files on the right:

  • yarn start: Defaults to development environment and loading .env.development.local, .env.development, .env.local, .env.
  • yarn build: Defaults to production environment and loading .env.production.local, .env.production, .env.local, .env.
  • yarn test: Defaults to test environment and loading .env.test.local, .env.test.

These variables will act as the defaults if the machine does not explicitly set them. Please refer to the dotenv documentation for more details.

expenses-app-react-ts-gql's People

Contributors

iki avatar

Watchers

 avatar  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.