├── .watchmanconfig ├── server ├── services │ ├── handle_image.js │ ├── handle_text.js │ ├── document_sessions.js │ └── start_sockets.js ├── models │ ├── User.js │ └── Document.js ├── config │ └── passport.js ├── routes │ └── api │ │ ├── session.js │ │ ├── users.js │ │ └── documents.js └── server.js ├── app.json ├── docs ├── overview.png └── wireframes │ ├── draw-wireframe.png │ ├── splash-wireframe.png │ ├── welcome-wireframe.png │ └── type-wireframe-no-sidebar.png ├── public ├── favicon.png ├── images │ ├── create.gif │ ├── pic01.jpg │ ├── pic02.jpg │ ├── pic03.jpg │ ├── pic04.jpg │ ├── pic05.jpg │ ├── pic06.jpg │ ├── splash.png │ ├── typedraw.gif │ ├── typedraw-logo.png │ ├── typedraw-header.png │ └── logo.svg ├── splash │ ├── css │ │ ├── images │ │ │ └── overlay.png │ │ ├── demo.css │ │ ├── noscript.css │ │ └── font-awesome.min.css │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── js │ │ ├── jquery.scrolly.min.js │ │ ├── browser.min.js │ │ ├── jquery.scrollex.min.js │ │ ├── breakpoints.min.js │ │ ├── main.js │ │ └── util.js │ └── extras │ │ ├── README.txt │ │ ├── generic.html │ │ ├── LICENSE.txt │ │ └── elements.html ├── app │ ├── app.css │ └── app.html ├── canvas │ ├── pencil.svg │ ├── eraser.svg │ ├── canvas.html │ └── canvas.css ├── manifest.json └── index.html ├── src ├── styles │ ├── index.css │ ├── document_styles.js │ └── styles.js ├── util │ ├── host.js │ ├── platform_util.js │ ├── user_api_util.js │ ├── session_api_util.js │ ├── mobile_auth_util.js │ ├── route_util.jsx │ └── document_api_util.js ├── index.js ├── components │ ├── splash │ │ ├── splash.js │ │ ├── auth_container.js │ │ ├── welcome.js │ │ └── auth.js │ ├── root.js │ ├── documents │ │ ├── image_layer.web.js │ │ ├── document_frame.js │ │ ├── image_layer.js │ │ ├── document_frame.web.js │ │ ├── toolbar.web.js │ │ ├── toolbar_container.js │ │ ├── document_container.js │ │ ├── document.js │ │ ├── toolbar.js │ │ └── text_layer.js │ ├── home │ │ ├── home.js │ │ ├── collaborators_container.js │ │ ├── home_container.js │ │ └── collaborators.js │ ├── navigation.js │ └── navigation.web.js ├── actions │ ├── errors_actions.js │ ├── ui_actions.js │ ├── user_actions.js │ ├── session_actions.js │ └── document_actions.js ├── reducers │ ├── root_reducer.js │ ├── errors_reducer.js │ ├── users_reducer.js │ ├── session_reducer.js │ ├── documents_reducer.js │ └── ui_reducer.js ├── store │ └── store.js ├── canvas │ ├── pointer.js │ ├── webpack.config.js │ └── canvas.js └── App.js ├── prettier.config.js ├── .babelrc ├── .gitignore ├── .eslintrc ├── .flowconfig ├── webpack.config.js ├── package.json └── README.md /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /server/services/handle_image.js: -------------------------------------------------------------------------------- 1 | module.exports = image => image; 2 | -------------------------------------------------------------------------------- /server/services/handle_text.js: -------------------------------------------------------------------------------- 1 | module.exports = text => text; 2 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "sdkVersion": "27.0.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /docs/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/docs/overview.png -------------------------------------------------------------------------------- /public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/favicon.png -------------------------------------------------------------------------------- /public/images/create.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/images/create.gif -------------------------------------------------------------------------------- /public/images/pic01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/images/pic01.jpg -------------------------------------------------------------------------------- /public/images/pic02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/images/pic02.jpg -------------------------------------------------------------------------------- /public/images/pic03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/images/pic03.jpg -------------------------------------------------------------------------------- /public/images/pic04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/images/pic04.jpg -------------------------------------------------------------------------------- /public/images/pic05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/images/pic05.jpg -------------------------------------------------------------------------------- /public/images/pic06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/images/pic06.jpg -------------------------------------------------------------------------------- /public/images/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/images/splash.png -------------------------------------------------------------------------------- /public/images/typedraw.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/images/typedraw.gif -------------------------------------------------------------------------------- /src/styles/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /public/images/typedraw-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/images/typedraw-logo.png -------------------------------------------------------------------------------- /docs/wireframes/draw-wireframe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/docs/wireframes/draw-wireframe.png -------------------------------------------------------------------------------- /public/images/typedraw-header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/images/typedraw-header.png -------------------------------------------------------------------------------- /docs/wireframes/splash-wireframe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/docs/wireframes/splash-wireframe.png -------------------------------------------------------------------------------- /docs/wireframes/welcome-wireframe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/docs/wireframes/welcome-wireframe.png -------------------------------------------------------------------------------- /public/splash/css/images/overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/splash/css/images/overlay.png -------------------------------------------------------------------------------- /public/splash/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/splash/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /public/splash/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/splash/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /public/splash/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/splash/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /public/splash/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/splash/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/wireframes/type-wireframe-no-sidebar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/docs/wireframes/type-wireframe-no-sidebar.png -------------------------------------------------------------------------------- /public/splash/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/znrm/typedraw/HEAD/public/splash/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | printWidth: 80, 3 | tabWidth: 2, 4 | semi: true, 5 | singleQuote: true, 6 | bracketSpacing: true 7 | }; 8 | -------------------------------------------------------------------------------- /public/app/app.css: -------------------------------------------------------------------------------- 1 | #root { 2 | border-radius: 30px; 3 | display: flex; 4 | flex-direction: column; 5 | min-height: 100vh; 6 | overflow: hidden; 7 | } 8 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["babel-preset-expo"], 3 | "env": { 4 | "development": { 5 | "plugins": ["transform-react-jsx-source"] 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/util/host.js: -------------------------------------------------------------------------------- 1 | const HOST = process.env.NODE_ENV === 'production' 2 | ? 'https://www.typedraw.app' 3 | : 'http://localhost:5000'; 4 | 5 | export default HOST; 6 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './styles/index.css'; 4 | import App from './App'; 5 | 6 | ReactDOM.render(, document.getElementById('root')); 7 | -------------------------------------------------------------------------------- /src/util/platform_util.js: -------------------------------------------------------------------------------- 1 | const navByPlatform = (ownProps, mobileLocation, webLocation) => { 2 | if (ownProps.navigation) { 3 | ownProps.navigation.navigate(mobileLocation); 4 | } else { 5 | ownProps.history.push(webLocation); 6 | } 7 | }; 8 | 9 | export default navByPlatform; 10 | -------------------------------------------------------------------------------- /public/splash/css/demo.css: -------------------------------------------------------------------------------- 1 | .demo { 2 | width: 360px; 3 | height: 722px; 4 | margin: 20px auto; 5 | position: relative; 6 | } 7 | 8 | .demo iframe { 9 | position: absolute; 10 | bottom: 25px; 11 | left: 25px; 12 | height: 89.8%; 13 | width: 86%; 14 | overflow: hidden; 15 | } 16 | -------------------------------------------------------------------------------- /src/util/user_api_util.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import HOST from './host'; 3 | 4 | export const createUser = ({ email, password }) => 5 | axios.post(`${HOST}/api/users/register`, { 6 | email, 7 | password 8 | }); 9 | 10 | export const dummmy = 'dummy so linter will ctfo'; 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/keys.js 2 | 3 | **/bundle.js 4 | **/*.map 5 | **/*.bundle.js 6 | 7 | .expo/ 8 | **/node_modules 9 | 10 | **/npm-debug.* 11 | 12 | .env.local 13 | .env.development.local 14 | .env.test.local 15 | .env.production.local 16 | 17 | npm-debug.log* 18 | yarn-debug.log* 19 | yarn-error.log* 20 | -------------------------------------------------------------------------------- /src/components/splash/splash.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { View } from 'react-native'; 3 | import AuthContainer from './auth_container'; 4 | import styles from '../../styles/styles'; 5 | 6 | const Splash = () => ( 7 | 8 | 9 | 10 | ); 11 | 12 | export default Splash; 13 | -------------------------------------------------------------------------------- /public/canvas/pencil.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/actions/errors_actions.js: -------------------------------------------------------------------------------- 1 | export const RECEIVE_ERRORS = 'RECEIVE_ERRORS'; 2 | export const CLEAR_ERRORS = 'CLEAR_ERRORS'; 3 | 4 | export const receiveErrors = errs => ({ 5 | type: RECEIVE_ERRORS, 6 | errs 7 | }); 8 | 9 | const clearErrors = () => ({ 10 | type: CLEAR_ERRORS 11 | }); 12 | 13 | export const removeErrors = () => dispatch => dispatch(clearErrors); 14 | -------------------------------------------------------------------------------- /src/components/root.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { connect } from 'react-redux'; 3 | import { AppStack, RootStack } from './navigation'; 4 | 5 | const mapState = ({ session }) => ({ loggedIn: session.loggedIn }); 6 | 7 | const Root = connect(mapState)( 8 | ({ loggedIn }) => (loggedIn ? : ) 9 | ); 10 | 11 | export default Root; 12 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "TypeDraw", 3 | "name": "TypeDraw", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /src/util/session_api_util.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import HOST from './host'; 3 | 4 | export const fetchCurrentSession = token => 5 | axios.get(`${HOST}/api/users/current`, { headers: token }); 6 | 7 | export const startSession = user => 8 | axios.post(`${HOST}/api/session/login`, user); 9 | 10 | export const endSession = () => axios.get(`${HOST}/api/session/logout`); 11 | -------------------------------------------------------------------------------- /src/reducers/root_reducer.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux'; 2 | import session from './session_reducer'; 3 | import errors from './errors_reducer'; 4 | import documents from './documents_reducer'; 5 | import ui from './ui_reducer'; 6 | import users from './users_reducer'; 7 | 8 | export default combineReducers({ 9 | users, 10 | documents, 11 | session, 12 | errors, 13 | ui 14 | }); 15 | -------------------------------------------------------------------------------- /src/util/mobile_auth_util.js: -------------------------------------------------------------------------------- 1 | import { AsyncStorage } from 'react-native'; 2 | 3 | const TOKEN = 'WEB_TOKEN'; 4 | 5 | export const getAuthToken = async () => { 6 | const token = await AsyncStorage.getItem(TOKEN); 7 | return token; 8 | }; 9 | 10 | export const setAuthToken = token => AsyncStorage.setItem(TOKEN, token); 11 | 12 | export const destroyAuthToken = () => AsyncStorage.setItem(TOKEN, ''); 13 | -------------------------------------------------------------------------------- /public/splash/css/noscript.css: -------------------------------------------------------------------------------- 1 | /* 2 | Stellar by HTML5 UP 3 | html5up.net | @ajlkn 4 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | */ 6 | 7 | /* Header */ 8 | 9 | body.is-preload #header.alt > * { 10 | opacity: 1; 11 | } 12 | 13 | body.is-preload #header.alt .logo { 14 | -moz-transform: none; 15 | -webkit-transform: none; 16 | -ms-transform: none; 17 | transform: none; 18 | } -------------------------------------------------------------------------------- /src/components/documents/image_layer.web.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import HOST from '../../util/host'; 3 | 4 | const ImageLayer = ({ documentId }) => ( 5 |