Commit 429ceebc authored by Michaela DeForest's avatar Michaela DeForest
Browse files

Initial commit

parents
variables:
AWSECR_REGISTRY: 550192021380.dkr.ecr.us-east-1.amazonaws.com
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
APP_NAME: fund-module
DOCKER_HOST: tcp://docker:2375
publish:
only:
- master
image:
name: amazon/aws-cli
entrypoint: [""]
services:
- docker:dind
before_script:
- amazon-linux-extras install docker
- aws --version
- docker --version
- echo $ONESTEP_CROWDFUND_S3_BUCKET
script:
# - docker build -t $AWSECR_REGISTRY/$APP_NAME:$CI_PIPELINE_IID -t $AWSECR_REGISTRY/$APP_NAME:latest funding-backend/
- docker build -t $AWSECR_REGISTRY/$APP_NAME:$CI_PIPELINE_IID -t $AWSECR_REGISTRY/$APP_NAME:latest --build-arg ONESTEP_CROWDFUND_DB_REGION=$ONESTEP_CROWDFUND_DB_REGION --build-arg ONESTEP_CROWDFUND_DB_URL=$ONESTEP_CROWDFUND_DB_URL --build-arg ONESTEP_AUTHORIZATION_URL=$ONESTEP_AUTHORIZATION_URL --build-arg ONESTEP_BLOCKCHAIN_URL=$ONESTEP_BLOCKCHAIN_URL --build-arg ONESTEP_ORG_URLONESTEP_ORG_URL=$ONESTEP_ORG_URLONESTEP_ORG_URL --build-arg ONESTEP_REWARDS_URL=$ONESTEP_REWARDS_URL --build-arg ONESTEP_CROWDFUND_CLIENT_ID=$ONESTEP_CROWDFUND_CLIENT_ID --build-arg ONESTEP_CROWDFUND_SECRET_KEY=$ONESTEP_CROWDFUND_SECRET_KEY --build-arg ONESTEP_CROWDFUND_S3_ID=$ONESTEP_CROWDFUND_S3_ID --build-arg ONESTEP_CROWDFUND_S3_REGION=$ONESTEP_CROWDFUND_S3_REGION --build-arg ONESTEP_CROWDFUND_S3_SECRET=$ONESTEP_CROWDFUND_S3_SECRET --build-arg ONESTEP_CROWDFUND_S3_BUCKET=$ONESTEP_CROWDFUND_S3_BUCKET funding-backend/
- aws ecr get-login-password | docker login --username AWS --password-stdin $AWSECR_REGISTRY
- docker push $AWSECR_REGISTRY/$APP_NAME --all-tags
default:
image: node:latest
before_script:
- cd funding-frontend
- npm install --cache .npm --prefer-offline
- |
{
echo "@${CI_PROJECT_ROOT_NAMESPACE}:registry=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/npm/"
echo "${CI_API_V4_URL#https?}/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=\${CI_JOB_TOKEN}"
} | tee --append .npmrc
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .npm/
workflow:
rules:
- if: $CI_COMMIT_BRANCH
variables:
NPM_TOKEN: ${CI_JOB_TOKEN}
stages:
- release
publish:
stage: release
script:
- npm run semantic-release
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
include:
- "/.gitlab-ci-backend.yml"
# - "/.gitlab-ci-node-frontend.yml"
This diff is collapsed.
# **Team 3 Project Area**
## Table of Contents
- [Team members](#team-members)
- [Product Owner](#product-owner)
- [Faculty](#faculty)
- [Technologies](#technologies)
- [Project Overview](#Project Overview)
- [Project Plan](#Project Plan)
- [Fund Module](#Fund Module)
- [Resource Module](#Resource Module)
## Team Members
* [Erik Subatis](ers739@g.harvard.edu)
* [Gregory Retter](grr486@g.harvard.edu)
* [Joshua Markovic](jom5985@g.harvard.edu)
* [Shantha Kumari Rajendran](rajendran@g.harvard.edu)
* [Sharjil Khan](shk305@g.harvard.edu)
* [Zane Hernandez](zah693@g.harvard.edu)
## Product Owner
* Nitya Timalsina
## Faculty
* Annie Kamlang
* Eric Gieseke
* Hannah Riggs
## Technologies
* Programming Languages
* Java
* Javascript
* Data Persistence
* Dynamo DB
* S3
* Misc.
* React
* DropWizard
* IntelliJ
* Node.js
* Shards
## Project Overview
This repository is set for the development of one quarter of the OneStep Relief
Platform. Specifically the code and assets stored here are for the
organization, definition, and implementation of the platform's Fund and
Resource Modules. Each of these modules will be further elaborated on in their
own sections as seen below.
## Project Plan
1. Sprint 1
1. Fund Module
2. Sprint 2
3. Sprint 3
4. Sprint 4
## Fund Module
### Introduction
The Fund Module facilitates all the crowdfunding and general funding functions
within the OneStep Relief Platform. Such function include creating a relief
project fund and the reception and distribution of funds. The module allows for
the creation, update and management of Crowdfunds, which represent a
fundraising goal for a designated purpose; concrete examples could include
building a new school or purchasing food/beds for disaster stricken areas.
### Requirements
The requirements of the OneStep Relief Platform's Fund Module are:
* Create and Manage Crowfunds of for OneStep Relief Projects
* Transfer funds to/from Crowdfunds via blockchain utility service
### Organization
The following outlines the layout of the fund module portion of Team 3's
OneStep Relief Repository.
#### Back-End
This is where the fund module's back-end code and tests are stored. These subsections are
further divided into three main folders: API, Model, and Service.
All three use the following path: org.onestep.relief.crowfund
##### API
This subsection contains the REST API for the Fund Module.
Utilizing DropWizard, the code contained here collects requests and sends
responses between the UI of the front-end and the Dynamo DB database of the
back-end.
###### Files:
* App.java - Application class to run the fund module's back-end
* CrowdFundConfiguration.java - Configuration class to define the config of the
fund module
* DefaultHealthCheck.java - Definition of the health check for the fund module
* FundRequest.java - Class to define fund related requests to the database
* FundResponse.java - Class to define fund related responses to the database
* Page.java - Class to define pagination for the fund module's UI
##### Model
This subsection contains the Dynamo DB service and object classes of the Fund
Module. The fund module's Dynamo Database and its tables are accessed here in
response to requests from the REST API.
###### Files:
* Donation.java - Definition of a donation object. One of three transaction
classes employed by the module to transfer money between funds (user to fund)
* DynamoDBConfiguration.java - Configuration class to define the parameters of
the Amazon AWS Dynamo DB database employed by the fund module.
* Fund.java - Definition of a fund object. Funds are created to store money for
particular relief projects.
* FundDynamoDBService.java - Service class that contains java code that enables
direct interaction with the Fund Module's Dynamo DB database.
* FundState.java - Enumeration class used to define the current status of a
Fund. Employed by the Fund object class.
##### Service
This subsection contains the service implementation that translates REST API
requests and responses to Dynamo DB calls.
###### Files:
* CrowdFundException.java - Exception class for the Fund Module. Triggers for
various errors that could occur in using the Fund Module.
* CrowdFundService.java - Service implementation class. Acts as the bridge
connecting the REST API calls to the DynamoService to affect changes to
the database.
* CrowdFundServiceResource.java - Class to answer requests from the UI
supplying relevant data from the Dynamo DB database through the
DynamoDBService and the implementation of the Crowd Fund Service.
* ICrowdFundService.java - Java interface for the crowdfund service.
Defines the methods available to the service implementation class.
#### Front-End
This is where the fund module's front-end code is stored. It is broken into
various subsections containing code written in javascript.
These sections include but are not limited too:
* Assets - Contains features that add more functionality to a website
(e.g. date picker)
* Components - Contains the various elements and widgets of a view webpage.
* Data - Contains the various subelements for various pieces of the front-end
(e.g. the buttons on the side bar menu)
* Flux - Contains JS code to handle elements of the layout that can change
(e.g. the side bar)
* Images - Contains various images used by the front-end of the Fund Module.
Examples include user avatars.
* Layouts - Contains html to define the layout of special elements such as:
* Navigation Bar
* Side Bar
* Footer
* Shards-Dashboard - Contains details and examples of how to use the bootstrap
tool shards dashboard for a user interface.
* Styles - Contains CSS code defining attributes used in determining the look
of views in the Fund Module.
* Utils - Contains utility elements for a web app such as JS code to create
charts.
* Views - Contains JS code describing the design of the webpages used by the
Fund Module.
## Resource Module
To Be Added...
\ No newline at end of file
/target
\ No newline at end of file
# Default ignored files
/shelf/
/workspace.xml
crowdfund
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="crowdfund" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="crowdfund" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: aopalliance:aopalliance:1.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/aopalliance/aopalliance/1.0/aopalliance-1.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/aopalliance/aopalliance/1.0/aopalliance-1.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: ch.qos.logback:logback-access:1.2.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-access/1.2.3/logback-access-1.2.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-access/1.2.3/logback-access-1.2.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-access/1.2.3/logback-access-1.2.3-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: ch.qos.logback:logback-classic:1.2.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: ch.qos.logback:logback-core:1.2.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.algorand:algosdk:1.5.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/algorand/algosdk/1.5.1/algosdk-1.5.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/algorand/algosdk/1.5.1/algosdk-1.5.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/algorand/algosdk/1.5.1/algosdk-1.5.1-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.amazonaws:aws-java-sdk-core:1.11.327">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/amazonaws/aws-java-sdk-core/1.11.327/aws-java-sdk-core-1.11.327.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/amazonaws/aws-java-sdk-core/1.11.327/aws-java-sdk-core-1.11.327-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/amazonaws/aws-java-sdk-core/1.11.327/aws-java-sdk-core-1.11.327-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: com.amazonaws:aws-java-sdk-dynamodb:1.11.327">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/amazonaws/aws-java-sdk-dynamodb/1.11.327/aws-java-sdk-dynamodb-1.11.327.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/amazonaws/aws-java-sdk-dynamodb/1.11.327/aws-java-sdk-dynamodb-1.11.327-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/amazonaws/aws-java-sdk-dynamodb/1.11.327/aws-java-sdk-dynamodb-1.11.327-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment