diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..b5217a1
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,10 @@
+# editorconfig.org
+root = true
+
+[*]
+indent_style = space
+indent_size = 2
+end_of_line = lf
+charset = utf-8
+insert_final_newline = true
+trim_trailing_whitespace = true
diff --git a/.env.example b/.env.example
index 56b7539..059f4ef 100644
--- a/.env.example
+++ b/.env.example
@@ -5,4 +5,4 @@ CLIENT_SECRET=...
NEO4J_USERNAME=...
NEO4J_PASSWORD=...
// OAuth callback URL
-CALLBACK_URL=...
\ No newline at end of file
+CALLBACK_URL=...
diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 0000000..18df5a1
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,3 @@
+#folders#
+public/
+node_modules/
diff --git a/.eslintrc.json b/.eslintrc.json
index cee3996..30cc9c6 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,7 +1,24 @@
{
- "extends": "airbnb",
- "env": {
- "browser": true,
- "node": true
- }
+ "extends": "airbnb",
+ "plugins": ["prettier"],
+ "env": {
+ "browser": true,
+ "node": true,
+ "es6": true
+ },
+ "rules": {
+ "arrow-parens": ["error", "as-needed"],
+ "no-console": 0,
+ "react/prop-types": 0,
+ "comma-dangle": [
+ "error",
+ {
+ "arrays": "never",
+ "objects": "never",
+ "imports": "never",
+ "exports": "never",
+ "functions": "ignore"
+ }
+ ]
+ }
}
diff --git a/.gitignore b/.gitignore
index d54406e..19acf05 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ dist/bundle.js
npm-debug.log
.env
*hot-update*
+c855bcf167bb6f333cfe6dfb9f3771ba.bmp
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index e3eac9f..0832d55 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -33,7 +33,7 @@
Use github’s interface to make a fork of the repo, then add that repo as an upstream remote:
```
-git remote add upstream https://github.com/cranebaes/gitbud.git
+git remote add upstream https://github.com/Toucans456/gitpal.git
```
### Cut a namespaced feature branch from master
diff --git a/PRESS_RELEASE.md b/PRESS_RELEASE.md
index f5cbf36..12f98d0 100644
--- a/PRESS_RELEASE.md
+++ b/PRESS_RELEASE.md
@@ -1,8 +1,8 @@
-## Gitbud
+## GitPal
### Sub-Heading
-> Gitbud is an application that allows users to connect with others who are either at the same level or higher to work on open source projects. Users can view current projects, interested users, and pair up to work on a project together.
+> GitPal is an application that allows users to connect with others who are either at the same level or higher to work on open source projects. Users can view current projects, interested users, and pair up to work on a project together.
### Summary
@@ -18,16 +18,12 @@
### Quote from You
-> "GitBud provides new coders with their first real challenge; pushing them beyond tutorials on syntax and online games like CodeWars. It gets developers' hands dirty with their first real project or experience with with real-world code".
+> "GitPal provides new coders with their first real challenge; pushing them beyond tutorials on syntax and online games like CodeWars. It gets developers' hands dirty with their first real project or experience with with real-world code".
### How to Get Started
-> Login to Gitbud with your Github account. From there, navigate through the list of projects and select a project that you want to get started on. Inside the project's detail, you can find a list of users who are also interested. Feel free to message them and let them know you want to pair up with them. Once the two of you are paired up, you can begin on the project.
+> Login to GitPal with your Github account. From there, navigate through the list of projects and select a project that you want to get started on. Inside the project's detail, you can find a list of users who are also interested. Feel free to message them and let them know you want to pair up with them. Once the two of you are paired up, you can begin on the project.
### Customer Quote
-> "Gitbud helped me get started on my first open source project with ease."
-
-### Closing and Call to Action
-
-> FILL_ME_IN
+> "GitPal helped me get started on my first open source project with ease."
diff --git a/README.md b/README.md
index 43a54fc..840f28b 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,54 @@
-# GitBud
+# GitPal
-> GitBud is an application that allows users to connect with others who are either at the same level or higher to work on open source projects. Users can view current projects, interested users, and pair up to work on a project together.
+> GitPal is an application that was forked from GitBud that allows users to connect with others who are either at the same level or higher to work on open source projects. Users can view current projects, interested users, and pair up to work on a project together.
-## Team
-
- - __Product Owner__: Shaikat Haque
- - __Scrum Master__: Francis Ngo
- - __Development Team Members__: Peter Warner-Medley, Brian Kim
+
## Table of Contents
-1. [Usage](#Usage)
+1. [Team](#team)
+1. [Preview](#preview)
+ 1. [Demo](#demo)
+ 1. [Screenshots](#screenshots)
+1. [Usage](#usage)
1. [Requirements](#requirements)
1. [Development](#development)
1. [Installing Dependencies](#installing-dependencies)
1. [Tasks](#tasks)
-1. [Team](#team)
+ 1. [Roadmap](#roadmap)
+1. [More Information](#more-information)
+ 1. [Server README](#server-readme)
+ 1. [Client README](#client-readme)
+1. [GitBud Repo](#gitbud-repo)
1. [Contributing](#contributing)
+## Team
+
+ - __Product Owner__: Scott Schaefer
+ - __Scrum Master__: Rick Gallegos
+ - __Development Team Members__: Christine Zimmerman, Scott Mitchell, Sonrisa Chen
+
+## Preview
+
+### Demo
+
+Click [here](https://gitpal.herokuapp.com/) to try out GitPal
+
+### Screenshots
+
+[Sample projects](https://s3.amazonaws.com/poly-screenshots.angel.co/Project/c6/610187/3857f3ab5dc89ba8668d64090a631d09-original.png)
+
+[Project page](https://s3.amazonaws.com/poly-screenshots.angel.co/Project/c6/610187/2e76e08872778c681adc67e8eb0edac7-original.png)
+
+[User Profile](https://s3.amazonaws.com/poly-screenshots.angel.co/Project/c6/610187/f8b4f7744d08fe5d166b127b7ca88fdd-original.png)
+
+[Navigation Drawer](https://s3.amazonaws.com/poly-screenshots.angel.co/Project/c6/610187/1177499d4beb39863b539f274faf0d9a-original.png)
+
+[My Partners page](https://s3.amazonaws.com/poly-screenshots.angel.co/Project/c6/610187/b762fd98fafa7ec781ca2af220a948f6-original.png)
+
## Usage
-> __Environment Variables__ GitBud has hardcoded a username of 'neo4j' and a password of 'neo' for neo4j. You can change these in the code or override them by setting the appropriate environment variables. You will also need a GitHub Client ID and Client Secret to use the GitHub API. These, too, are set as environment variables. We have used the .env package, which allows environment variables to be set easily with the .env file in the root directory of the project. An example of the necessary variables for GitBud been provided here in this repo.
+> __Environment Variables__ GitPal has hardcoded a username of 'neo4j' and a password of 'neo' for neo4j. You can change these in the code or override them by setting the appropriate environment variables. You will also need a GitHub Client ID and Client Secret to use the GitHub API. These, too, are set as environment variables. We have used the .env package, which allows environment variables to be set easily with the .env file in the root directory of the project. An example of the necessary variables for GitPal been provided here in this repo.
- Fork and clone the repo
- Install dependencies from the root of the repo by running
@@ -63,8 +91,22 @@ npm install
### Roadmap
-View the project roadmap [here](https://github.com/cranebaes/gitbud/issues)
+View the project roadmap [here](https://github.com/Toucans456/GitPal/issues)
+
+## More Information
+
+### Server README
+
+View the GitPal server README [here](client/README.md)
+
+### Client README
+
+View the GitPal client README [here](server/README.md)
+
+## GitBud Repo
+View the original Repo
+[here](https://github.com/cranebaes/gitbud/)
## Contributing
diff --git a/client/README.md b/client/README.md
index 16b494e..f178089 100644
--- a/client/README.md
+++ b/client/README.md
@@ -1,54 +1,79 @@
+# GitPal Client
+
+## Table of Contents
+
+1. [Login/Signup](#login/signup)
+1. [Questionnaire](#questionnaire)
+1. [Project List](#project-list)
+1. [Project Details](#project-details)
+1. [User Details](#user-details)
+1. [Project Status](#project-status)
+1. [My Projects](#my-projects)
+1. [My Partners](#my-partners)
+1. [My Account](#my-account)
+
## Login/Signup
-- The landing page is the entry point to the app.
-- Handled by the Landing react component, the user has the option to login with Github.
+- The landing page is the entry point to the app.
+- Handled by the Landing react component, the user has the option to login with Github.
- Clicking the login button will send a GET request to the url /auth/github.
- If this is the user's first time, the user will be routed to the Questionnaire component.
- This logic is handled App component, where a check is made to see if the user's loggedIn state has certain properties.
- If the user has logged in before, then they will be redirected to a project list page.
-## Questionniare
+## Questionnaire
- This page asks the user for:
- Experience Level
- Interested Language
- - Profile Descripion
+ - Profile Description
- This info is stored in the user's node in the database and is displayed in the user's profile.
- After completing the questionnaire, user is taken to the Project List page.
## Project List
+
- This can be considered the home page.
-- The list of available projects to work on will be displated
-- Clicking on a project will have 2 possibe outcomes:
+- The list of available projects to work on will be displayed
+- Clicking on a project will have 2 possible outcomes:
- If the user is not working on the project, they will be taken to the project details page.
- If the user is already working on the project with a pair, they will be taken to the Project Status page.
- This logic is handled inside a 'smart' Project container.
- The container checks the user's state to see whether the user is paired on a project or not, and renders the appropriate component.
## Project Details
+
- This page displays information about a project such description, link to GitHub repo, and a list of recommended users to pair with.
- An Interest button allows user to express interest in the project.
- The Project Details component uses a UserList Component to display a list of recommended users who have also expressed interest in the project.
-- The list is sorted by an aglorithm on the server side that calculates the difference in coding activity by language between users.
+- The list is sorted by an algorithm on the server side that calculates the difference in coding activity by language between users.
- Clicking on a recommended user will route the user to the User Details component
## User Details
+
- This page displays user information collected from the questionnaire by a user
- There are options to message the user, and pairing with the user.
- Pairing with a user will establish a pairing between the 2 users, represented by a PAIRED_WITH relationship in neo4j.
- The 2 users will also officially start working on the project, established by a WORKING_ON relationship in neo4j.
-- The next time the user clicks the Project through the the project list page, they will be taken to the Project Status page.
+- The next time the user clicks the Project through the project list page, they will be taken to the Project Status page.
## Project Status
+
- This page has multiple checkboxes to that allow users to track their project progress.
- Clicking 'Submit Progress' after checking checkboxes will save the users progress.
- The next time the user enters the Project Status component, the boxes will remain checked.
+- This page also comes with a socket.io chat allowing the partnered users to collaborate on the project together in realtime.
## My Projects
+
- This component is accessible through the app bar.
- It displays the list of projects the user is currently WORKING_ON
+## My Partners
+
+- This component is accessible through the app bar.
+- It displays the list of users the currently logged in user is partnered with.
## My Account
+
- This component is accessible through the app bar
-- It displays the the user's information that was entered in the questionnaire
\ No newline at end of file
+- It displays the user's information that was entered in the questionnaire
diff --git a/client/assets/octocat.bmp b/client/assets/octocat.bmp
new file mode 100644
index 0000000..48d277b
Binary files /dev/null and b/client/assets/octocat.bmp differ
diff --git a/client/components/App.jsx b/client/components/App.jsx
index 218d479..b7df2c0 100644
--- a/client/components/App.jsx
+++ b/client/components/App.jsx
@@ -16,12 +16,9 @@ import { connect } from 'react-redux';
import axios from 'axios';
import AppBar from 'material-ui/AppBar';
-import Paper from 'material-ui/Paper';
import ActionHome from 'material-ui/svg-icons/action/home';
import IconButton from 'material-ui/IconButton';
-import FloatingActionButton from 'material-ui/FloatingActionButton';
import { fullWhite } from 'material-ui/styles/colors';
-import SocialPartyMode from 'material-ui/svg-icons/social/party-mode';
import AppDrawer from './AppDrawer';
import Landing from './Landing';
@@ -33,37 +30,51 @@ import ProjectList from './ProjectList';
import Questionnaire from './Questionnaire';
import NotFound from './NotFound';
import MyProjects from './MyProjects';
+import MyPartners from './MyPartners';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
loggedIn: false,
- drawerOpen: false,
- partyMode: false,
+ drawerOpen: false
+ };
+ this.checkAuthenticated();
+ this.navTap = this.navTap.bind(this);
+ }
+ componentDidUpdate() {
+ if (this.state.loggedIn) {
+ this.getAllUsers();
}
+ }
- this.checkAuthenticated();
+ getAllUsers() {
+ axios
+ .get('/API/allUsers')
+ .then(allUsers => this.props.addAllUsers(allUsers.data))
+ .catch(console.error);
+ }
- this.navTap = this.navTap.bind(this);
- this.togglePartyMode = this.togglePartyMode.bind(this);
+ getPairs() {
+ axios
+ .get('/API/pairs')
+ .then(pairs => this.props.loadPairedUsers(pairs.data))
+ .catch(console.error);
}
- //gets list of projects
+ // gets list of projects
getProjects() {
- axios.get('/API/projects/')
- .then((project) => {
- this.props.addProjectsList(project.data);
- })
+ axios
+ .get('/API/projects/')
+ .then(project => this.props.addProjectsList(project.data))
.catch(console.error);
}
- //gets messages
+ // gets messages
getMessages() {
- axios.get('/API/messages')
- .then((res) => {
- this.props.loadMessages(res.data)
- })
+ axios
+ .get('/API/messages')
+ .then(res => this.props.loadMessages(res.data))
.catch(console.error);
}
@@ -71,31 +82,17 @@ class App extends React.Component {
this.setState({ drawerOpen: !this.state.drawerOpen });
}
- //gets authentication
+ // gets authentication
checkAuthenticated() {
- axios.get('/auth/authenticated')
- .then((res) => {
+ axios.get('/auth/authenticated').then(res => {
+ if (res.data !== false) {
this.setState({ loggedIn: res.data });
this.getMessages();
this.getProjects();
- });
- }
-
- //party mode
- togglePartyMode() {
- const colors = ['blue', 'green', 'red', 'yellow', 'lilac'];
- if (this.state.partyMode) {
- clearInterval(this.state.partyMode);
- document.body.setAttribute('style', `background-color:white`);
- this.setState({ partyMode: false });
- } else {
- this.setState({partyMode:
- setInterval(() => {
- const randomNum = Math.floor(Math.random() * colors.length);
- document.body.setAttribute('style', `background-color:${colors[randomNum]}`);
- }, 200),
- });
- }
+ this.getPairs();
+ this.props.loggedInUser(res.data);
+ }
+ });
}
render() {
@@ -105,14 +102,32 @@ class App extends React.Component {
If user is new and logged in using github auth, render questionnaire
If user is not logged in (logged out) display landing page
*/
+
if (this.state.loggedIn.language) {
return (
- }/>
+
+
+
+
+
+ }
+ />
{/* opens and closes side menu */}
- this.setState({ drawerOpen: open }) } closeDrawer={ () => this.setState({ drawerOpen: false}) }/>
+ this.setState({ drawerOpen: open })}
+ closeDrawer={() => this.setState({ drawerOpen: false })}
+ />
{/*
Switch renders a route exclusively. Without it, it would route inclusively
@@ -125,60 +140,79 @@ class App extends React.Component {
-
+ (
+
+ )}
+ />
{/*
given this path render this component and pass down the loggedIn state as user props
*/}
- () } />
+ }
+ />
+
-
-
-
);
} else if (this.state.loggedIn) {
return ;
- } else {
- return ;
}
+ return ;
}
}
/*
Allows App component to have message and project state
*/
-const mapStateToProps = (state) => {
- return {
- message: state.message,
- projects: state.projects,
- };
-};
+const mapStateToProps = state => ({
+ message: state.message,
+ projects: state.projects,
+ pairedUsers: state.pairedUsers
+});
/*
Map our dispatch to App component as props
Dispatch can be found in store/reducers.js
*/
-const mapDispatchToProps = (dispatch) => {
- return {
- changeString: () => dispatch({
- type: 'CHANGE_STRING',
- text: 'some other message'
+const mapDispatchToProps = dispatch => ({
+ addAllUsers: allUsers =>
+ dispatch({
+ type: 'LOAD_ALL_USERS',
+ allUsers
}),
- addProjectsList: projects => dispatch({
+ addProjectsList: projects =>
+ dispatch({
type: 'LIST_PROJECTS',
- projects,
+ projects
}),
- loadMessages: messages => dispatch({
+ loadMessages: messages =>
+ dispatch({
type: 'MESSAGES_LOAD',
- messages,
+ messages
+ }),
+ loadPairedUsers: pairedUsers =>
+ dispatch({
+ type: 'LOAD_PAIRING',
+ pairedUsers
+ }),
+ loggedInUser: loggedInUser =>
+ dispatch({
+ type: 'UPDATED_LOGGEDIN_USER',
+ loggedInUser
}),
- };
-};
+ loggedOut: () =>
+ dispatch({
+ type: 'USER_LOGOUT'
+ })
+});
-//connects the Store to App component
+// connects the Store to App component
export default connect(mapStateToProps, mapDispatchToProps)(App);
diff --git a/client/components/AppDrawer.jsx b/client/components/AppDrawer.jsx
index 38056ac..5aa51c8 100644
--- a/client/components/AppDrawer.jsx
+++ b/client/components/AppDrawer.jsx
@@ -5,9 +5,11 @@ import { Card, CardHeader } from 'material-ui/Card';
// menus and toolbars etc.
import Drawer from 'material-ui/Drawer';
import AppBar from 'material-ui/AppBar';
-import { BottomNavigation, BottomNavigationItem } from 'material-ui/BottomNavigation';
+import {
+ BottomNavigation,
+ BottomNavigationItem
+} from 'material-ui/BottomNavigation';
// buttons
-import FlatButton from 'material-ui/FlatButton';
import RaisedButton from 'material-ui/RaisedButton';
// icons
import ActionEject from 'material-ui/svg-icons/action/eject';
@@ -15,36 +17,74 @@ import ActionAccountCircle from 'material-ui/svg-icons/action/account-circle';
import ActionFace from 'material-ui/svg-icons/action/face';
import DeviceDeveloperMode from 'material-ui/svg-icons/device/developer-mode';
+/*
+Deprecated FindUsers button
+Add this to AppDrawer when user functionality expands
+
+ }/>
+*/
+
function AppDrawer(props) {
return (
-
-
-
-
-
-
- }/>
+
+
+
+
+
+
+ }
+ />
-
-
+
+
-
-
-
- }/>
-
+
+
+
+
+ }
+ />
+
-
+
- }/>
+ }
+ />
- } onClick={ props.closeDrawer }/>
+
+ }
+ onClick={props.closeDrawer}
+ />
+
- )
+ );
}
export default AppDrawer;
diff --git a/client/components/Landing.jsx b/client/components/Landing.jsx
index e76ea26..26b8585 100644
--- a/client/components/Landing.jsx
+++ b/client/components/Landing.jsx
@@ -1,26 +1,38 @@
import React from 'react';
-import { Link } from 'react-router-dom';
import { Card, CardMedia } from 'material-ui/Card';
import AppBar from 'material-ui/AppBar';
import RaisedButton from 'material-ui/RaisedButton';
// makes the theme available via a higher-0rder component
import muiThemeable from 'material-ui/styles/muiThemeable';
+import octocat from '../assets/octocat.bmp';
const style = {
- textAlign: 'center',
+ textAlign: 'center'
};
-function Landing(props) {
+function Landing() {
return (
-
-
+
+
-
+
-