Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback implementation #8

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d3fc6d4
-Feedback impementation
bumsyalao Oct 16, 2017
e3e587c
Run build for Heroku
bumsyalao Oct 20, 2017
08c81a8
chore(JsDocs):
bumsyalao Oct 20, 2017
292e0f4
chore(implement-feedback)
bumsyalao Oct 30, 2017
1c51e0b
chore: write client test
bumsyalao Nov 1, 2017
3ec6cd1
chore: Write client test
bumsyalao Nov 9, 2017
fa9c4b8
chore: Fix heroku issue
bumsyalao Nov 9, 2017
91a2693
chore: Implement feedback
bumsyalao Nov 13, 2017
db9b490
chore: Fix error with Heroku
bumsyalao Nov 13, 2017
587dd1e
chore: Fix Heroku Error
bumsyalao Nov 13, 2017
8f218d3
Chore: Fix Heroku Error
bumsyalao Nov 13, 2017
5c68f25
chore: Fix Heroku Error
bumsyalao Nov 13, 2017
6388e1d
Chore: Remove dist folder
bumsyalao Nov 13, 2017
d0832d2
chore: Fix Heroku Error
bumsyalao Nov 13, 2017
e8b1885
chore: Fix Heroku Error
bumsyalao Nov 13, 2017
f39b297
Chore: Implement feedback
bumsyalao Nov 14, 2017
4aed19b
Feature: Implement email notification
bumsyalao Nov 16, 2017
5fb5077
feature: Implement Add user
bumsyalao Nov 17, 2017
a30255f
Chore: Fix failing build
bumsyalao Nov 20, 2017
4557e03
Chore: Fix failing build
bumsyalao Nov 21, 2017
50c41c5
Rename SignInAction.js to signInAction.js
bumsyalao Nov 23, 2017
035c651
chore: User's group
bumsyalao Nov 24, 2017
257686c
chore: implement feedback
bumsyalao Nov 28, 2017
a3933b7
chore: rename usergroups model
bumsyalao Nov 28, 2017
003bc3c
Transferring API Description file from Apiary.io
bumsyalao Nov 8, 2017
e64fbc2
Merge branch 'rename-usergroup-model' of https://github.com/bumsyalao…
bumsyalao Nov 29, 2017
a6b2e17
Merge https://github.com/bumsyalao/PostIt-Bootcamp-Project into renam…
bumsyalao Nov 29, 2017
3edf9b3
Rename usergroups.test.js to userGroups.test.js
bumsyalao Nov 29, 2017
6defc13
Rename usergroups.test.js to userGroups.test.js
bumsyalao Nov 29, 2017
bf9ad8c
Rename usergroups.js to userGroups.js
bumsyalao Nov 29, 2017
faeb491
Rename usergroups.js to userGroups.js
bumsyalao Nov 29, 2017
b6c88ec
Merge pull request #9 from bumsyalao/rename-usergroup-model
bumsyalao Nov 29, 2017
0e51bb8
made changes
bumsyalao Jan 22, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
{
"presets": ["es2015", "react", "stage-0"]
"presets": [
"es2015",
"react",
["env", {
"targets": {
"node": "current"
}
}],
"stage-0"
],
"plugins": [
"react-html-attrs",
"transform-class-properties",
"transform-decorators-legacy"
]
}
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DATABASE_URL_TEST=DATABASE-URL
SECRET=SECRET
USEREMAIL=EMAIL
USERPASS=PASSWORD
DATABASE_URL=DATABASE_URL
19 changes: 17 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@
"max-len": [1, 80, 2],
"one-var": 0,
"one-var-declaration-per-line": 0,
"import/no-named-as-default": 0,
"new-cap": 0,
"consistent-return": 0,
"no-param-reassign": 0,
"comma-dangle": 0,
"curly": ["error", "multi-line"],
"react/jsx-uses-vars": 2,
"react/jsx-uses-vars": "error",
"react/jsx-uses-react": "error",
"import/no-unresolved": [2, { "commonjs": true , "amd": true}],
"import/named": 2,
"import/namespace": 2,
Expand All @@ -48,6 +50,19 @@
}]
},
"globals": {
"Materialize": true
"Materialize": true,
"React": true,
"window": true,
"$": true,
"document": true,
"localStorage": true,
"componentDidMount": true
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js",".jsx",".png"]
}
}
}
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
.env
coverage
.nyc_output
.nyc_output
dist
2 changes: 1 addition & 1 deletion .hound.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
eslint:
enabled: true
enabled: false
config_file: eslintrc.json
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ before_script:
- npm install -g sequelize-cli
- sudo -u postgres createuser bunmialao
- createdb postit-test
- sequelize db:migrate
script:
- npm run test
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [2017] [Olubunmi Alao]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
48 changes: 33 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ A cool App that allows users create groups and post notifications to group.

It provides restful APIs for users to create groups, post messages and retrieve messages based on userId and managing authentication of users with JsonWebToken.

[![Build Status](https://travis-ci.org/bumsyalao/PostIt-Bootcamp-Project.svg?branch=master)](https://travis-ci.org/bumsyalao/PostIt-Bootcamp-Project) [![Coverage Status](https://coveralls.io/repos/github/bumsyalao/PostIt-Bootcamp-Project/badge.svg?branch=master)](https://coveralls.io/github/bumsyalao/PostIt-Bootcamp-Project?branch=master) [![Code Climate](https://codeclimate.com/github/bumsyalao/PostIt-Bootcamp-Project/badges/gpa.svg)](https://codeclimate.com/github/bumsyalao/PostIt-Bootcamp-Project)
[![Build Status](https://travis-ci.org/bumsyalao/PostIt-Bootcamp-Project.svg?branch=feedback-implementation)](https://travis-ci.org/bumsyalao/PostIt-Bootcamp-Project) [![Coverage Status](https://coveralls.io/repos/github/bumsyalao/PostIt-Bootcamp-Project/badge.svg?branch=feedback-implementation)](https://coveralls.io/github/bumsyalao/PostIt-Bootcamp-Project?branch=feedback-implementation) [![Code Climate](https://codeclimate.com/github/bumsyalao/PostIt-Bootcamp-Project/badges/gpa.svg)](https://codeclimate.com/github/bumsyalao/PostIt-Bootcamp-Project)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

##### Hosted App on Heroku
[Post-it](https://postit-now.herokuapp.com/)

[Api Documentation](https://app.apiary.io/postit13/)
[Api Documentation](https://postit13.docs.apiary.io/)

### Key Application Features

A user can perform the following:
- Create an account
- Login to account
- User can create groups of friends
- User can create group and add friends
- User can join any group of choice.
- Users can send messages to all their friends or to different groups they belong to.
- Users can search for other users in the app.
Expand All @@ -36,7 +37,10 @@ The frontend was built with the react and redux framework.
### Installation

- Clone the project repository.
- Run git clone (https://github.com/bumsyalao/PostIt-Bootcamp-Project)
- Run git clone (https://github.com/bumsyalao/PostIt-Bootcamp-Project)

``` git clone https://github.com/bumsyalao/PostIt-Bootcamp-Project ```

more info: (https://help.github.com/articles/cloning-a-repository/)
- Run ``` npm install ``` to install the dependencies in the package.json file.
- Create Postgresql database and run ```sequelize dbmigrate npm undo and npm redo ```(https://www.postgresql.org/)
Expand All @@ -56,18 +60,32 @@ Login, Sign Up and start creating groups
- SASS/SCSS.
- Postgres (https://www.postgresql.org/)

### Contributing
### Limitations
+ Users cannot upload their picture.
+ Users cannot leave a group.
+ Users cannot delete a message when sent
+ Users cannot delete other users.

### FAQ
#### Is PostIt app free or do you plan to monetize it in future?
Yes its totally free and it will continue to be free

#### How many end points are there currently?
Currently its 14

#### Is PostIt app open source?
Yes, and I encourage you to contribute to the project

#### What if I want to customize my environment variables?
That's easy. In the root of the project. create a file named .env and add exactly what you see in the .env.example file.

- Fork this repositry to your account.
- Clone your repositry: ``` git clone ```
https://github.com/andela-cofor/postit.git.
- Create your feature branch: ``` git checkout -b new-feature ```
- Commit your changes: ``` git commit -m "did something" ```
- Push to the remote branch: ``` git push origin new-feature ```
- Open a pull request.

#### Licence
### Contribution
I am glad you want to contribute to this project, Please checkout the wiki page [Contributing](https://github.com/bumsyalao/PostIt-Bootcamp-Project/wiki/Contributing)

ISC
### Author
Olubunmi Alao
## License & Copyright
MIT © [Olubunmi Alao](https://github.com/bumsyalao)

Copyright (c) 2017 Bunmi Alao
Licensed under the [MIT License](LICENSE)
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const express = require('express');
const logger = require('morgan');
const bodyParser = require('body-parser');
const routes = require('./server/routes/index');
const routes = require('./server/routes');

const port = parseInt(process.env.PORT, 10) || 3000;
const homepage = `${__dirname}/client/index.html`;

// Set up the express app
const app = express();

Expand Down
7 changes: 2 additions & 5 deletions client/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ import { render } from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
import { Provider } from 'react-redux';
import jwt from 'jsonwebtoken';
import thunk from 'redux-thunk';
import { createStore, applyMiddleware, compose } from 'redux';
import attachAuthorizationToken from '../client/utils/attachToken';
import attachAuthorizationToken from '../client/utils/attachAuthorizationToken';
import store from '../client/store/configureStore';
import setCurrentUser from './actions/authAction';
import { LOGGEDIN_USER } from './actions/types';
import './scss/style.scss';
import Routes from './Routes';
Expand All @@ -21,7 +18,7 @@ if (token) {
userId: decoded.userId,
username: decoded.username,
email: decoded.email,
phonenumber: decoded.phonenumber
phoneNumber: decoded.phoneNumber
};
store.dispatch(
{ type: LOGGEDIN_USER, userInfo }
Expand Down
17 changes: 5 additions & 12 deletions client/Routes.jsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
import React from 'react';
import { Route, IndexRoute, Switch } from 'react-router-dom';
import NavigationBar from './components/NavigationBar';
import Sidebar from './components/Sidebar';
import App from './components/App';
import { Route, Switch } from 'react-router-dom';
import Dashboard from './components/Dashboard';
import SignupPage from './components/Signup/SignupPage';
import SignInPage from './components/SignIn/SignInPage';
import CreateGroup from './components/Group/CreateGroup';
import Homepage from './components/Homepage';
import ForgotPassword from './components/SignIn/ForgotPassword';
import ResetPassword from './components/SignIn/ResetPassword';
import ErrorPage from './components/ErrorPage';
// import UsersPage from './components/Users/UsersPage';
import PageNotFound from './components/PageNotFound';

const Routes = () => (
<Switch>
<Route exact path="/" component={Dashboard} />
<Route path="/Sidebar" component={Sidebar}/>
<Route path="/signup" component={SignupPage} />
<Route path="/signin" component={SignInPage} />
<Route path="/forgot-password" component={ForgotPassword} />
{/* <Route path="/create/group" component={CreateGroup} /> */}
<Route path="/reset-password" component={ResetPassword} />

<Route path="/reset-password" component={ResetPassword} />
<Route path="/homepage" component={Homepage} />
<Route component={ErrorPage}/>
<Route component={PageNotFound}/>
</Switch>
);

Expand Down
16 changes: 16 additions & 0 deletions client/__mocks__/localStorageMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
let localStorage = {};

export default {
setItem(key, value) {
return Object.assign(localStorage, { [key]: value });
},
getItem(key) {
return localStorage[key];
},
removeItem(key) {
return delete localStorage[key];
},
clear() {
localStorage = {};
}
};
5 changes: 0 additions & 5 deletions client/__tests__/actions/authAction.test.js

This file was deleted.

Loading