Giter VIP home page Giter VIP logo

swarch's Introduction

SWArch

Run

~/SWArch/5200_flask_app: flask run

Docs

address sheet

Detailed Design Document

mongoDB

UI

  • The UI relies on the Bootstrap and JavaScript.
  • Navigating to the upload page, you will be greeted with a drop down menu where you choose the country to upload.
  • Selecting a country triggers an Ajax request to a form factory that returns correct version of the form based on country selected.
  • Client side validation is responsible for ensuring that the required fields for that country are not empty.

Form Factory

  • It is instantiated through the factory pattern.
  • It consults rules tables for the fields to be provided for countries.

API

  • The API can be invoked by the application as well as the user.
  • The API receives requests, either from the UI or from a service such as curl.
  • When calling the API for upload or query, Country Data must always be provided in JSON format.
  • API provides four endpoints.
    • The home(/api) endpoint gives information about accessible endpoints and accepted data format.
    • The upload(/api/upload) and query(/api/query) endpoints are invoked by the UI through POST requests to upload and query the address data.
    • The address can also be directly updated using /api/update/{addressID} endpont. This accepts the PUT requests and expects JSON payload with the addressID.

Database Ops

  1. start mongodb: mongo --authenticationDatabase admin
  2. use mongodb terminal: mongo --port 27017 --authenticationDatabase admin
  3. create a db called arch in the terminal: use arch; //it's not created actually until you insert some ducuments into it
  4. create a collection: db.createCollection("addresses");
  5. insert a document into the collection: db.addresses.insert({"name":"test"});

Helpful links

MongoDB tutorial

swarch's People

Contributors

acroneberger avatar f-zainab avatar xxx0624 avatar nazneentamboli 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.