Giter Club home page Giter Club logo

dreamfill's Introduction

Dreamfill

#KeepTheKids

A web tool to assist with filling out DACA paperwork. This is a Code for PDX project done in collaboration with Portland Community College CLEAR Clinic. See the problem description in our wiki.

Please read our code of conduct.

If you're interested in learning more about our project and getting involved, please join us at one of our meetup events! You can also request an invite to join our Slack channel by contacting our project manager, Jordan: [email protected]

Table of Contents

Tech Overview

This is a web app built using React for the in-browser interface, and a backend web service implemented with the Flask web framework in Python.

Our dev environment is entirely containerized with Docker, and no other dependencies need to be installed natively. We use Python's pipenv for maintaining backend dependencies. We use mypy to type check any optional typings and pytest to test backend code. We use NPM to develop and build the frontend code. Docker is used to build and deploy the app stack for both local development and for deployment to the web.

Installation

You can get your dev environment up and running with installing only Docker and docker-compose. The npm and backend dev servers run in docker containers, synced with source code directories so that code changes propagate on the local servers right away. If you have any trouble, don't hesitate to ask on our Slack channel!

  1. Fork the repo to create a copy for your own github account, and clone your own copy. (Read CONTRIBUTING.md for important info about syncing code your on github)

  2. Install docker

Running the docker stack

In the project's root directory, run make up. This launches the containers (and first builds the backend custom image if it doesn't exist yet) using docker-compose. Start and stop the running stack with make up and make down.

After this target completes, you can navigate to http://localhost:3000 in the browser and connect to the React dev server with full hot-module reloading. This may take a minute or two to come up before it is available while it installs node modules. Check the service with make frontend_logs.

In the course of backend development, one may not need to be running the React/HMR dev server. To build the frontend static files, and use Flask to serve them, run the following command:

$ make frontend_down frontend_build

Then navigate to http://localhost:5000 to access the backend service directly. This is configured to serve the static files. make up will start the HMR dev server again at 3000 if you stopped it.

Whenever a dependency is added to the backend, someone needs to rebuild the dev-tagged image and push or folks will get errors when trying to run the stack. To do so, rebuild the image, and reload the backend with:

$ make backend_build backend_reload

For more project documentation on Docker, some troubleshooting, and some basic commands, see: doc/docker.md

Cleaning

While in the directory of your local repo, run:

$ make clean

in order to remove build artifacts.

To completely remove containers, volumes, and compose networks, run:

$ make clobber

Testing

Currently using pytest for testing the backend. Run all backend tests by running the following command in the project root directory:

$ make backend_test

This runs a pytest command to execute all the unit tests inside the backend docker container. All of these tests should pass if you have correctly set up the backend dev environment.

To run a subset of test cases without first shelling into the docker container, you can use a docker-compose exec command, which specifies a container by service name and a runnable command in the container in a single step, e.g.:

$ docker-compose exec expungeservice pipenv run pytest tests/[subdir]

To specify and run a subset of the test cases.

License

This project is open source under the terms of the MIT License.

dreamfill's People

Contributors

wittejm avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

seharlan

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.