Git Product home page Git Product logo

silicon_beach_admin's Introduction

silicon_beach_admin

A Flutter app for Silicon Beach admins.

Code gen for built_value

After making changes to built_value classes run the builder to generate the new code:

flutter pub run build_runner build

Running

Run on port 5000, as localhost:5000 is whitelisted for Google authentication:

flutter run -d web-server --web-port 5000
flutter run -d chrome --web-port 5000

Issues

Firebase Auth

When running locally, the firebase configuration won't work as it is using reserved hosting URLs.

Using CDNs as in web/index_ddc.html will work.

  • note: this file is not checked in to the repo

Google Sign in

When launching from VS Code debug, attempting to sign in produces:

“Browser or app may not be secure. Try using a different browser.”

Probably due to running chrome with remote debugging, see this SO question

Either run without debugging:

flutter run -d web-server --web-port 5000

Or use AltAuthService in place of AuthService, which emits a user from the stream of auth state and avoids the need to sign in.

Building

flutter build web 

Deploying

Setup

First make sure you are signed in:

firebase login

From build/web run:

firebase init
  • What do you want to use as your public directory?
    • .
  • Configure as a single-page app?
    • Yes
  • File ./index.html already exists. Overwrite?
    • No

Specify your site in firebase.json

  • Add your site name to the firebase.json configuration file.
{
  "hosting": {
    "site": "silicon-beach-admin",
    "public": "public",
    ...
  }
}

Deploy

firebase deploy --only hosting:silicon-beach-admin

After deploying, view at https://silicon-beach-admin.web.app/

Redux RemoteDevTools (RDT)

  • find the IP address of the computer
  • use one of the strings in utilities/mock.dart or make a new one
  • edit main.dart to use the correct IP
  • run the remotedev server
remotedev --port 8000
  • open a web page with url:
http://localhost:8000/

Tests

Unit and Widget Tests

flutter test

Integration Tests

flutter drive --target=test_driver/app.dart

silicon_beach_admin's People

Contributors

nickmeinhold avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

silicon_beach_admin's Issues

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.