Giter VIP home page Giter VIP logo

question-box-frontend's Introduction

Benatna Frontend

This is the front-end single page application developed to accompany the Back End of a Question Box REST-like API designed to promote a peer-to-peer, culturally appropriate approach to Sex Education in Refugees and New Germans.

The front-end consist of a Single Page Application developed using Vue.JS with Progressive Web App implementations. It connects via Axios with the back-end and it implements several functionalities of Service Workers: Push Notifications, Caching, Offline Usage, and Installing on an Android Mobile Device.

Table of Contents

Prerequisites

The back-end requires you to have node.js ^8.10 and npm ^3.5.2 installed in your development machine. The compiled minified version can run in any HTML server.

Getting Started

First, download or clone this repository.

git clone https://github.com/Benatna/question-box-frontend.git

After downloaded, access the downloaded folder and install the required dependencies.

cd question-box-backend
npm install

You will also want to modify the environment variables files before using it.

nano .env

You can see the list of required environment variables and their definition here.

Once you have defined the environment variables, you can run the application using one of these three commands:

First, you can compile it and enable hot-reloading for development purposes:

npm run serve

Second, you can compile it and minify it for production:

npm run build

NOTE: This will generate a "dist" folder that can be copied and run in any HTML server. If you want to test these files, you can do so using a package like serve.

Finally, you can also run the included linter to fix some problems with the code:

npm run lint

Environment Variables

Variable Example Comments
VUE_APP_I18N_LOCALE VUE_APP_I18N_LOCALE=en Defines the initial language of your application (for when an user logins for the first time)
VUE_APP_I18N_FALLBACK_LOCALE VUE_APP_I18N_FALLBACK_LOCALE=en If enabled, when a translation is not found, the version of this locale will be shown
VUE_APP_REST_API VUE_APP_REST_API=HTTP://API.YOURDOMAIN.COM/ URL where your API is found.
VUE_APP_VAPID_PUBLIC_KEY VUE_APP_VAPID_PUBLIC_KEY=BCv-0bxPV_RQj(..) Generated VAPID public key. You can find more information about this on the backend page

Project Structure

The project is using Vue's component-based structure. We try to keep Javascript and CSS files ordered in such a way that if a class/function is implemented in multiple components, then it belongs to the parent component. You can find more information in [Vue.js official guide[(https://vuejs.org/v2/guide/components.html).

Multilanguage

At the moment, language options are hard-coded, and implemented using the Vue CLI 3 i18n plugin. In the folder /src/locales/ you can find two JSON files that are used for translation. You can modify existing text and/or add new text in these files. For more information, visit visit the plugin's official page.

External Resources

Get in Touch

If you need any help and/or want to get in touch with us, don't hesitate to Submit an Issue, and/or contact us at [email protected], or via Facebook and Twitter.

Acknowledgements

Thanks to Ahmad, Ahmed, Nickhil, Zain and Zeina for their support, hard work, and insights during the development and deployment of this solution.

Team

This project was created in six months for the beautiful team of:

  • Cornelia Blum: Lead.
  • Pedro Poblete Lasserre: Coder.
  • Hector Pahaut: Designer.
  • Pooja Veerappa: User Researcher.
  • Juli Maier: Mentor.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Funding

Funding for the initial development of this project came from the Prototype Fund, an initiative of the German Federal Ministry of Education and Research.

question-box-frontend's People

Contributors

nellablum avatar

Watchers

 avatar

Forkers

prototypefund

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.