Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
5c4a961
Update README.md
lydiahallie Jun 10, 2018
46f06de
Install prettier and husky
benadamstyles Sep 2, 2018
d15e92e
Add prettier config and test precommit hook
benadamstyles Sep 2, 2018
e0c85ba
Commit yarn.lock
benadamstyles Sep 2, 2018
5dd7f14
Remove manual pre-commit hook in favour of using husky and lint-stage…
benadamstyles Sep 3, 2018
d6eaedc
implement feedback on PR
mazma1 Sep 4, 2018
9570aa6
password verification if emailId exist in DB
satyadeeproat Sep 5, 2018
03ac800
Merge branch 'feature/husky_and_prettier' into dev
benadamstyles Sep 5, 2018
28dcb96
Merge branch 'dev' into fix/user-authentication
satyadeeproat Sep 5, 2018
e446c42
adjusted footer, and image-preview for viewing on smaller screens
jessepeterman Sep 5, 2018
4a7f94c
Merge pull request #11 from lydiahallie/responsive-footer-images
jessepeterman Sep 5, 2018
81857de
login and signup routes separated
satyadeeproat Sep 7, 2018
aee9ac0
Merge commit '9e1b1d75f3aed385bc5182977209e16c989c9ed7' into dev
benadamstyles Sep 7, 2018
88ebae1
Merge pull request #10 from satyadeeproat/fix/user-authentication
satyadeeproat Sep 8, 2018
74103ca
Extend eslintrc with prettier
jadlers Sep 8, 2018
6bca57c
api/userauth is divided into /login and /signup
satyadeeproat Sep 10, 2018
7121a66
Merge pull request #15 from satyadeeproat/fix/userauth-clientside
satyadeeproat Sep 10, 2018
5d2db85
api/userauth is divided into /login and /signup
satyadeeproat Sep 10, 2018
f8bf5b9
Remove eslint-config-prettier & add rules manually
jadlers Sep 11, 2018
1ac5361
Run `prettier --write` on entire code-base
jadlers Sep 11, 2018
4c2e792
Disable warning for server startup console.log
jadlers Sep 11, 2018
2316afd
Add max-len rule set to 100
jadlers Sep 11, 2018
66f3e5b
Run `prettier --write` on entire code-base
jadlers Sep 11, 2018
09a7bac
Merge branch 'dev' into fix/eslint-prettier-conflicts
jadlers Sep 12, 2018
8d863a2
Merge pull request #14 from lydiahallie/fix/eslint-prettier-conflicts
jadlers Sep 12, 2018
0b1eca2
req.user set using a custom callback for authentication in passportjs
satyadeeproat Sep 12, 2018
7e51310
Merge branch 'dev' into fix/user-authentication
satyadeeproat Sep 12, 2018
6c326ba
Merge pull request #17 from satyadeeproat/fix/user-authentication
satyadeeproat Sep 12, 2018
6693ffe
modify the redux flow for signup and login
mazma1 Sep 11, 2018
41fa201
update response sent to the client after successful signup and login
mazma1 Sep 11, 2018
40410fa
fixes on auth form input fields
mazma1 Sep 11, 2018
7990598
fix state mutation in messages and posts reducers
mazma1 Sep 11, 2018
6205fb1
Merge pull request #19 from lydiahallie/fix/reducers_state_mutation_copy
mazma1 Sep 13, 2018
424eeba
GraphQL schema and mutation for login and signup
satyadeeproat Sep 13, 2018
833bc26
Rough Migration of all apis to graphql
satyadeeproat Sep 14, 2018
fef0b6d
all queries are working. mutation still in process
satyadeeproat Sep 14, 2018
550b5df
mutations updated for all apis
satyadeeproat Sep 14, 2018
8a2fa6e
Add IDs to types
lydiahallie Sep 14, 2018
4edce45
Indentation fix
lydiahallie Sep 15, 2018
fbbac33
Add user auth mutations and user query
lydiahallie Sep 15, 2018
e632d0a
Connect React Apollo
lydiahallie Sep 15, 2018
063df52
Add cors middleware in server
lydiahallie Sep 16, 2018
b271059
Create proxy and add http/cache dependencies
lydiahallie Sep 17, 2018
a53d5d4
Add messages in card mutation
lydiahallie Sep 18, 2018
3d009af
Add logout
lydiahallie Sep 18, 2018
e07a655
Update types
lydiahallie Sep 18, 2018
e82467a
Add mutations and queries for dashboard view
lydiahallie Sep 18, 2018
64769fd
Update routes
lydiahallie Sep 18, 2018
61ba689
Remove all REST functionality from Dashboard views
lydiahallie Sep 18, 2018
1811056
Remove Redux
lydiahallie Sep 18, 2018
2d4abd4
Add cors dependency
lydiahallie Sep 20, 2018
3758cee
Resolve conficts
lydiahallie Sep 20, 2018
0bd6b49
Merge pull request #21 from lydiahallie/feature/connect-graphql
lydiahallie Sep 20, 2018
800aca4
Fixed issue with header links moving around weirdly - by changing the…
jaevans36 Sep 20, 2018
4ac9d44
Fixed made the preview images responsive, and added zindex to the hea…
jaevans36 Sep 20, 2018
4d8ef61
Merge branch 'dev' into codebuddy-responsive-changes
jaevans36 Sep 24, 2018
b735b68
Fix signup
lydiahallie Nov 3, 2018
df00047
Add Typescript client
lydiahallie Nov 4, 2018
cecd105
Add typescript server
lydiahallie Nov 4, 2018
9cf9148
TS config
lydiahallie Nov 4, 2018
ddb72cd
Update config
lydiahallie Nov 4, 2018
89e018c
Fix
lydiahallie Nov 4, 2018
7aaf7ec
Fix TS issues
lydiahallie Nov 7, 2018
605228b
Fix linter issues and typings
lydiahallie Nov 7, 2018
46f94a9
Update tsconfig for global promise
lydiahallie Nov 9, 2018
c70b760
Merge pull request #23 from jaevans36/codebuddy-responsive-changes
lydiahallie Nov 10, 2018
7d934d4
Update README
lydiahallie Nov 10, 2018
138f919
Update README.md
lydiahallie Nov 10, 2018
153b393
Fix auth
lydiahallie Nov 11, 2018
e6c5841
Ignore dev.ts config
rickbolton Nov 11, 2018
d309991
react-scripts-ts fix and added node-sass-chokidar scripts
rickbolton Nov 11, 2018
2c03c16
Merge branch 'fix/cleanup' of github.com:lydiahallie/CodeBuddy into f…
lydiahallie Nov 11, 2018
e2c6f03
WIP
lydiahallie Nov 15, 2018
a85c37b
Fix auth and resolvers
lydiahallie Nov 24, 2018
871427e
Merge branch 'dev' into fix/cleanup
lydiahallie Nov 24, 2018
2b2a27f
Merge pull request #28 from lydiahallie/fix/cleanup
lydiahallie Nov 24, 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
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"plugins": ["transform-object-rest-spread"],
"presets": ["@babel/preset-typescript"]
}
90 changes: 82 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,96 @@
"extends": "airbnb",
"plugins": ["react", "jsx-a11y", "import"],
"rules": {
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/anchor-is-valid": 2,
"jsx-a11y/href-no-hash": "off",
"react/jsx-filename-extension": "off",
"react/button-has-type": 0,
"allowArrowFunctions": true,
"no-underscore-dangle": 0,
"array-bracket-spacing": "off",
"arrow-parens": ["error", "as-needed", { "requireForBlockBody": false }],
"arrow-parens": [
"error",
"as-needed",
{
"requireForBlockBody": false
}
],
"arrow-spacing": "off",
"block-spacing": "off",
"brace-style": "off",
"comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "ignore"
}],
"arrow-parens": ["error", "as-needed", { "requireForBlockBody": false }]
"comma-spacing": "off",
"comma-style": "off",
"computed-property-spacing": "off",
"dot-location": "off",
"eol-last": "error",
"func-call-spacing": "off",
"function-paren-newline": "off",
"generator-star-spacing": "off",
"implicit-arrow-linebreak": "off",
"indent": "off",
"jsx-a11y/anchor-is-valid": 2,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/href-no-hash": "off",
"jsx-a11y/no-static-element-interactions": 0,
"jsx-quotes": "off",
"key-spacing": "off",
"keyword-spacing": "off",
"max-len": ["error", {
"code": 100,
"ignoreUrls": true,
"ignoreStrings": true
}],
"new-parens": "off",
"newline-per-chained-call": "off",
"no-confusing-arrow": ["error", {"allowParens": true}],
"no-extra-semi": "off",
"no-floating-decimal": "off",
"no-mixed-spaces-and-tabs": "off",
"no-multi-spaces": "off",
"no-multiple-empty-lines": "off",
"no-spaced-func": "off",
"no-trailing-spaces": "off",
"no-underscore-dangle": 0,
"no-whitespace-before-property": "off",
"nonblock-statement-body-position": "off",
"object-curly-newline": "off",
"object-curly-spacing": "off",
"object-property-newline": "off",
"one-var-declaration-per-line": "off",
"operator-linebreak": "off",
"padded-blocks": "off",
"quote-props": "off",
"react/button-has-type": 0,
"react/jsx-closing-bracket-location": "off",
"react/jsx-closing-tag-location": "off",
"react/jsx-curly-spacing": "off",
"react/jsx-filename-extension": "off",
"react/jsx-first-prop-new-line": "off",
"react/jsx-indent": "off",
"react/jsx-indent-props": "off",
"react/jsx-max-props-per-line": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-props-no-multi-spaces": "off",
"react/jsx-tag-spacing": "off",
"react/jsx-wrap-multilines": "off",
"rest-spread-spacing": "off",
"semi": "off",
"semi-spacing": "off",
"semi-style": "off",
"space-before-blocks": "off",
"space-before-function-paren": "off",
"space-in-parens": "off",
"space-infix-ops": "off",
"space-unary-ops": "off",
"switch-colon-spacing": "off",
"template-curly-spacing": "off",
"template-tag-spacing": "off",
"unicode-bom": "off",
"wrap-iife": "off",
"yield-star-spacing": "off"
},
"parserOptions": {
"ecmaVersion": 8
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
yarn-error.log
yarn.lock

/node_modules
/node_modules
server/config/dev.ts
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package.json
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 100
}
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:9.6.1

RUN mkdir client/usr/src/app
WORKDIR /client/usr/src/app

ENV PATH /usr/src/app/node_modules/.bin:$PATH

COPY package.json /client/usr/src/app/package.json
RUN npm install --silent
RUN npm install react-scripts@1.1.1 -g --silent

CMD ["npm", "start"]
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
## CodeBuddy

### Installation
```sh
$ git clone git@github.com:lydiahallie/CodeBuddy.git
$ cd CodeBuddy
$ yarn
```
Run client:
```sh
$ cd client
$ yarn
$ cd ..
$ yarn client
```
Run server:
```sh
$ cd server
$ yarn
$ cd ..
$ ts-node -O '{"module":"commonjs"}' server
```
### Branches
Whenever you open a PR, please use the `dev` branch as the base branch.

### First draft version
![demo](preview1.gif)
2 changes: 1 addition & 1 deletion client/config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = {
appBuild: resolveApp('build'),
appPublic: resolveApp('public'),
appHtml: resolveApp('public/index.html'),
appIndexJs: resolveApp('src/index.js'),
appIndexJs: resolveApp('src/index.tsx'),
appPackageJson: resolveApp('package.json'),
appSrc: resolveApp('src'),
yarnLockFile: resolveApp('yarn.lock'),
Expand Down
23 changes: 12 additions & 11 deletions client/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ module.exports = {
// This is the URL that app is served from. We use "/" in development.
publicPath,
// Point sourcemap entries to original disk location (format as URL on Windows)
devtoolModuleFilenameTemplate: info => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/'),
devtoolModuleFilenameTemplate: info =>
path.resolve(info.absoluteResourcePath).replace(/\\/g, '/'),
},
resolve: {
// This allows you to set a fallback for where Webpack should look for modules.
Expand All @@ -71,17 +72,16 @@ module.exports = {
// https://github.com/facebookincubator/create-react-app/issues/253
modules: ['node_modules', paths.appNodeModules].concat(
// It is guaranteed to exist because we tweak it in `env.js`
process.env.NODE_PATH.split(path.delimiter).filter(Boolean),
process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
),
// These are the reasonable defaults supported by the Node ecosystem.
// We also include JSX as a common component filename extension to support
// some tools, although we do not recommend using it, see:
// https://github.com/facebookincubator/create-react-app/issues/290
// `web` extension prefixes have been added for better support
// for React Native Web.
extensions: ['.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx'],
extensions: ['.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx', '.ts', '.tsx'],
alias: {

// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
'react-native': 'react-native-web',
Expand Down Expand Up @@ -118,6 +118,8 @@ module.exports = {
],
include: paths.appSrc,
},
{ test: /\.tsx?$/, loader: "awesome-typescript-loader" },
{ enforce: "pre", test: /\.js$/, loader: "source-map-loader" },
{
// "oneOf" will traverse all following loaders until one will
// match the requirements. When no loader matches it will fall
Expand All @@ -140,7 +142,6 @@ module.exports = {
include: paths.appSrc,
loader: require.resolve('babel-loader'),
options: {

// This is a feature of `babel-loader` for webpack (not Babel itself).
// It enables caching results in ./node_modules/.cache/babel-loader/
// directory for faster rebuilds.
Expand Down Expand Up @@ -215,16 +216,16 @@ module.exports = {
],
},
plugins: [
// Makes some environment variables available in index.html.
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
// In development, this will be an empty string.
new InterpolateHtmlPlugin(env.raw),
// Generates an `index.html` file with the <script> injected.
new HtmlWebpackPlugin({
inject: true,
template: paths.appHtml,
}),
// Makes some environment variables available in index.html.
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
// In development, this will be an empty string.
new InterpolateHtmlPlugin(env.raw),
// Add module names to factory functions so they appear in browser profiler.
new webpack.NamedModulesPlugin(),
// Makes some environment variables available to the JS code, for example:
Expand Down Expand Up @@ -263,4 +264,4 @@ module.exports = {
performance: {
hints: false,
},
};
};
3 changes: 1 addition & 2 deletions client/config/webpackDevServer.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable func-names */
const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
const ignoredFiles = require('react-dev-utils/ignoredFiles');
Expand All @@ -8,7 +7,7 @@ const paths = require('./paths');
const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
const host = process.env.HOST || '0.0.0.0';

module.exports = function (proxy, allowedHost) {
module.exports = function(proxy, allowedHost) {
return {
// WebpackDevServer 2.4.3 introduced a security fix that prevents remote
// websites from potentially accessing local content through DNS rebinding:
Expand Down
21 changes: 18 additions & 3 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"apollo-boost": "^0.1.16",
"apollo-cache-inmemory": "^1.2.10",
"apollo-link-http": "^1.5.5",
"autoprefixer": "7.1.6",
"axios": "^0.18.0",
"babel-core": "6.26.0",
Expand All @@ -11,6 +14,7 @@
"babel-loader": "7.1.2",
"babel-preset-react-app": "^3.1.1",
"babel-runtime": "6.26.0",
"camelcase": "^5.0.0",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"chalk": "1.1.3",
"chart.js": "^1.1.1",
Expand All @@ -21,23 +25,29 @@
"extract-text-webpack-plugin": "3.0.2",
"file-loader": "1.1.5",
"fs-extra": "3.0.1",
"graphql": "^14.0.2",
"graphql-tag": "^2.9.2",
"html-webpack-plugin": "2.29.0",
"jest": "20.0.4",
"lodash": "^4.17.10",
"moment": "^2.22.2",
"node-sass": "^4.9.0",
"node-sass-chokidar": "^1.3.4",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "3.2.0",
"postcss-loader": "2.0.8",
"promise": "8.0.1",
"prop-types": "^15.6.2",
"raf": "3.4.0",
"react": "^16.4.0",
"react-apollo": "^2.1.11",
"react-chartjs": "^1.2.0",
"react-dev-utils": "^5.0.1",
"react-dom": "^16.4.0",
"react-particles-js": "^2.2.0",
"react-redux": "^5.0.7",
"react-router-dom": "^4.3.1",
"react-scripts-ts": "^3.1.0",
"react-testing-library": "^5.0.0",
"redux": "^4.0.0",
"redux-devtools-extension": "^2.13.2",
Expand All @@ -49,15 +59,17 @@
"style-loader": "^0.21.0",
"styled-components": "^3.3.2",
"sw-precache-webpack-plugin": "0.11.4",
"typescript": "^3.1.6",
"url-loader": "0.6.2",
"webpack": "3.8.1",
"webpack-dev-server": "2.9.4",
"webpack-manifest-plugin": "1.3.2",
"whatwg-fetch": "2.0.3"
},
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"build-css": "node-sass-chokidar src/ -o src/",
"watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive",
"start": "react-scripts-ts start",
"build": "react-scripts-ts build",
"test": "node scripts/test.js --env=jsdom"
},
"jest": {
Expand Down Expand Up @@ -103,6 +115,9 @@
},
"/api/*": {
"target": "http://localhost:5000"
},
"/graphql": {
"target": "http://localhost:5000"
}
},
"babel": {
Expand Down
5 changes: 1 addition & 4 deletions client/scripts/build.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable global-require, import/no-dynamic-require, no-console */

// Do this as the first thing so that any code reading it knows the right env.
process.env.BABEL_ENV = 'production';
process.env.NODE_ENV = 'production';
Expand All @@ -26,8 +24,7 @@ const printBuildError = require('react-dev-utils/printBuildError');
const paths = require('../config/paths');
const config = require('../config/webpack.config.prod');

const { measureFileSizesBeforeBuild } = FileSizeReporter;
const { printFileSizesAfterBuild } = FileSizeReporter;
const { measureFileSizesBeforeBuild, printFileSizesAfterBuild } = FileSizeReporter;
const useYarn = fs.existsSync(paths.yarnLockFile);

// These sizes are pretty large. We'll warn for bundles exceeding them.
Expand Down
34 changes: 0 additions & 34 deletions client/src/actions/index.js

This file was deleted.

Loading