Giter Site home page Giter Site logo

sot's Introduction

Source of Truth

This repository is for Source of Truth, a mobile app to act as a single point of reference for information about AND Somerville.

Initial Setup:

Prerequisites

This guide assumes you are setting this up on OSX. You should have homebrew and git installed.

Android setup

Follow the React Native CLI Quickstart setup for MacOS with target OS as Android. Ignore the part about setting up a new app, but ensure you've followed the subsequent instructions to create a virtual Android device in Android studio.

The above instructions will have installed the Azul Zulu OpenJDK version of Java 11. You should ensure the JAVA_HOME environment variable points to the Java 11 OpenJDK. The easiest way to manage this is to install jEnv, a tool for managing multiple Java versions:

  • install jEnv: brew install jenv
  • add the zulu11 OpenJDK installation directory to the Java versions jEnv knows about. For an x86 mac, this should be: jenv add /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
  • JAVA_HOME should now point to Java 11 when inside this repo, as it will be picked up from the .java-version file. You can check this with echo $JAVA_HOME

iOS setup

[TODO]

App setup

  • Clone this repository, and from within the source-of-truth folder, execute npm install

Contentful setup

  • You will need to add some environment variables to a .env file to provide the appropriate Contentful space and API key to the app. Reach out to one of the existing devs for what these should be, otherwise the app will just display a 401 error.

App execution

Common development commands are defined as scripts in package.json:

  • npm run android - start the react packager/server and the android simulator
  • npm run ios - start the react packager/server and the iOS simulator
  • npm run lint - Run ESLint
  • npm start - start the react packager/server
  • npm test - Run the test suite

Text styling

In order for use to use a custom font on the app we have to use custom components to apply the style to the text

You can find these in components/Text. Use these components instead of the default <Text> so the text styling is consistent accross the app.

Adding a new font

If you need to add a new font to the app, add the file in assets/fonts and run the command npx react-native-asset in the terminal.

Addind a new text style component

If you need to use a different style of text to the ones already present, create a new component in components/Text following the same structure as the other ones and adjusting the styling to your needs.

sot's People

Contributors

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