├── pages ├── 404.md ├── 500.md ├── home.md ├── about.md └── contact.json ├── README.md ├── LICENSE └── resources.json /pages/404.md: -------------------------------------------------------------------------------- 1 | ## Not Found 2 | 3 | Sorry, but the page you are trying to view does not exist. 4 | -------------------------------------------------------------------------------- /pages/500.md: -------------------------------------------------------------------------------- 1 | ## Whoops! 2 | 3 | We are experiencing some technical difficulties, possibly due to a network or service interruption. 4 | 5 | Sorry for the inconvenience, Please try again later. 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flux-react-example-data 2 | > The data for flux-react-example 3 | 4 | This data service uses the github api as the data service provider. No mediation happening here, just serving data that contains references to other data. 5 | 6 | The main data resource is located in [resources.json](/resources.json). Through this resource, all other app data resources are obtained and linked. 7 | -------------------------------------------------------------------------------- /pages/home.md: -------------------------------------------------------------------------------- 1 | ## Welcome To The Demo 2 | This is an isomorphic web app that demonstrates performance techniques and multiple backing services. 3 | 4 | ### Data Driven Flux & React 5 | All the content you see, including navigation, comes from a [backend data service](https://github.com/localnerve/flux-react-example-data). 6 | This application uses Facebook's [React](http://reactjs.com) and Yahoo's [Fluxible](http://fluxible.io). 7 | -------------------------------------------------------------------------------- /pages/about.md: -------------------------------------------------------------------------------- 1 | ## About This Demo 2 | 3 | This demo is only meant to be a reference application. It serves as a possible source of inspiration for solving problems during isomorphic application development, or as a basis for a [progressive application](https://infrequently.org/2015/06/progressive-apps-escaping-tabs-without-losing-our-soul/). 4 | 5 | The outgoing mail queue is currently disconnected from this application on Heroku, so contact form completions will not succeed. 6 | 7 | Please visit the project [documentation](https://github.com/localnerve/flux-react-example/wiki) for more detailed info, or contact me @localnerve. 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Alex Grant 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of flux-react-example-data nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | -------------------------------------------------------------------------------- /pages/contact.json: -------------------------------------------------------------------------------- 1 | { 2 | "contact": { 3 | "name": "contact", 4 | "headingText": "Contact Me", 5 | "stepFinal": 3, 6 | "resultMessageFail": "Message Not Sent, click to Retry.", 7 | "resultMessageSuccess": "Message Sent Successfully", 8 | "navigation": { 9 | "previous": { 10 | "text": "Back", 11 | "help": "Press here if you would like to go back to the previous form" 12 | }, 13 | "next": { 14 | "text": "Next", 15 | "help": "Press here after you've filled out all form elements", 16 | "last": "Submit" 17 | } 18 | }, 19 | "steps": [ 20 | { 21 | "step": 0, 22 | "name": "name", 23 | "introduction": { 24 | "text": "Interested in creating an app like this? Drop me a line!" 25 | }, 26 | "label": { 27 | "text": "What is your name?", 28 | "help": "Enter your name" 29 | } 30 | }, 31 | { 32 | "step": 1, 33 | "name": "email", 34 | "introduction": { 35 | "text": "Almost there, keep going!" 36 | }, 37 | "label": { 38 | "text": "What is your email address?", 39 | "help": "Enter your email address" 40 | } 41 | }, 42 | { 43 | "step": 2, 44 | "name": "message", 45 | "introduction": { 46 | "text": "Last step. Remember, the mail queue is disconnected." 47 | }, 48 | "label": { 49 | "text": "What is your message?", 50 | "help": "Enter your message" 51 | } 52 | }, 53 | { 54 | "step": 3, 55 | "name": "result", 56 | "introduction": { 57 | "text": "" 58 | }, 59 | "label": { 60 | "failure": { 61 | "text": "Whoops!" 62 | }, 63 | "success": { 64 | "text": "Thank you!" 65 | } 66 | }, 67 | "message": { 68 | "failure": { 69 | "text": "Our contact service is temporarily unavailable. Here's some help to deliver your message:", 70 | "email": "Email your message", 71 | "emailHelp": "Start an email with your message", 72 | "copy": "Copy your message", 73 | "copyHelp": "Copy your message to clipboard", 74 | "call": "Call us" 75 | }, 76 | "success": { 77 | "text": "Your message has been sent. I'll be in touch with you within 48 hours." 78 | } 79 | } 80 | } 81 | ] 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /resources.json: -------------------------------------------------------------------------------- 1 | { 2 | "routes": { 3 | "404": { 4 | "path": "/404", 5 | "method": "get", 6 | "page": "404", 7 | "label": "Not Found", 8 | "component": "ContentPage", 9 | "mainNav": false, 10 | "background": "", 11 | "order": 0, 12 | "priority": 0, 13 | "action": { 14 | "name": "page", 15 | "params": { 16 | "resource": "404", 17 | "url": "https://api.github.com/repos/localnerve/flux-react-example-data/contents/pages/404.md", 18 | "format": "markdown", 19 | "models": [ 20 | "LocalBusiness", 21 | "SiteInfo" 22 | ], 23 | "pageTitle": "Page Not Found" 24 | } 25 | } 26 | }, 27 | "500": { 28 | "path": "/500", 29 | "method": "get", 30 | "page": "500", 31 | "label": "Error", 32 | "component": "ContentPage", 33 | "mainNav": false, 34 | "background": "", 35 | "order": 0, 36 | "priority": 0, 37 | "action": { 38 | "name": "page", 39 | "params": { 40 | "resource": "500", 41 | "url": "https://api.github.com/repos/localnerve/flux-react-example-data/contents/pages/500.md", 42 | "format": "markdown", 43 | "models": [ 44 | "LocalBusiness", 45 | "SiteInfo" 46 | ], 47 | "pageTitle": "Application Error" 48 | } 49 | } 50 | }, 51 | "home": { 52 | "path": "/", 53 | "method": "get", 54 | "page": "home", 55 | "label": "Home", 56 | "component": "ContentPage", 57 | "mainNav": true, 58 | "background": "3.jpg", 59 | "order": 0, 60 | "priority": 1, 61 | "siteMeta": { 62 | "priority": 1.0, 63 | "changefreq": "daily" 64 | }, 65 | "action": { 66 | "name": "page", 67 | "params": { 68 | "resource": "home", 69 | "url": "https://api.github.com/repos/localnerve/flux-react-example-data/contents/pages/home.md", 70 | "format": "markdown", 71 | "models": [ 72 | "LocalBusiness", 73 | "SiteInfo" 74 | ], 75 | "pageTitle": "An Example Isomorphic Application" 76 | } 77 | } 78 | }, 79 | "about": { 80 | "path": "/about", 81 | "method": "get", 82 | "page": "about", 83 | "label": "About", 84 | "component": "ContentPage", 85 | "mainNav": true, 86 | "background": "4.jpg", 87 | "order": 1, 88 | "priority": 1, 89 | "siteMeta": { 90 | "priority": 0.5, 91 | "changefreq": "monthly" 92 | }, 93 | "action": { 94 | "name": "page", 95 | "params": { 96 | "resource": "about", 97 | "url": "https://api.github.com/repos/localnerve/flux-react-example-data/contents/pages/about.md", 98 | "format": "markdown", 99 | "models": [ 100 | "LocalBusiness", 101 | "SiteInfo" 102 | ], 103 | "pageTitle": "About" 104 | } 105 | } 106 | }, 107 | "contact": { 108 | "path": "/contact", 109 | "method": "get", 110 | "page": "contact", 111 | "label": "Contact", 112 | "component": "Contact", 113 | "mainNav": true, 114 | "background": "5.jpg", 115 | "order": 2, 116 | "priority": 1, 117 | "siteMeta": { 118 | "priority": 0.8, 119 | "changefreq": "weekly" 120 | }, 121 | "action": { 122 | "name": "page", 123 | "params": { 124 | "resource": "contact", 125 | "url": "https://api.github.com/repos/localnerve/flux-react-example-data/contents/pages/contact.json", 126 | "format": "json", 127 | "models": [ 128 | "LocalBusiness", 129 | "SiteInfo" 130 | ], 131 | "pageTitle": "Contact" 132 | } 133 | } 134 | } 135 | }, 136 | "models": { 137 | "LocalBusiness": { 138 | "legalName": "LocalNerve, LLC", 139 | "alternateName": "LocalNerve", 140 | "url": "http://localnerve.com", 141 | "telephone": "207-370-8005", 142 | "email": "alex@localnerve.com", 143 | "address": { 144 | "streetAddress": "PO BOX 95", 145 | "addressRegion": "ME", 146 | "addressLocality": "Windham", 147 | "addressCountry": "USA", 148 | "postalCode": "04062", 149 | "postOfficeBoxNumber": "95" 150 | } 151 | }, 152 | "SiteInfo": { 153 | "site": { 154 | "name": "Contactor", 155 | "tagLine": "A Fluxible, Reactive reference app with a good prognosis.", 156 | "bullets": ["Fluxible", "React", "Data Driven"] 157 | }, 158 | "license": { 159 | "type": "BSD", 160 | "url": "https://github.com/localnerve/flux-react-example/blob/master/LICENSE.md", 161 | "statement": "All code licensed under LocalNerve BSD License." 162 | }, 163 | "developer": { 164 | "name": "LocalNerve", 165 | "byLine": "Developed by LocalNerve", 166 | "url": "http://localnerve.com" 167 | }, 168 | "social": { 169 | "github": "https://github.com/localnerve/flux-react-example", 170 | "twitter": "https://twitter.com/localnerve", 171 | "facebook": "https://facebook.com/localnerve", 172 | "linkedin": "https://www.linkedin.com/in/alexpaulgrant", 173 | "googleplus": "https://plus.google.com/118303375063449115817/" 174 | } 175 | } 176 | } 177 | } 178 | --------------------------------------------------------------------------------