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

hacking information #47

Closed
paultag opened this issue Jan 4, 2016 · 6 comments
Closed

hacking information #47

paultag opened this issue Jan 4, 2016 · 6 comments

Comments

@paultag
Copy link

paultag commented Jan 4, 2016

Some light information on how to set up a dev (or outward facing) deployment would be great!

@OAGr
Copy link
Member

OAGr commented Jan 5, 2016

I'll need to add more here later, but here's a rough summary.

Guesstimate is a Single Page Application. Everything in this repo is the client side, which is one reason why this is called 'guesstimate-app'.

There are two important third party systems. Authentication is done with Auth0, and search/indexing is done with Algolia. This means that running it yourself involves some setup, but on the other hand it's pretty easy set up compared to what you may need in comparable systems. Both of these are free for moderate use. I recommend both, though should note that the way I set up Algolia was a bit hacky (not sure how to do it right).

There is also a small server in Rails, which is not yet on Github. I'd like to work on security a bit more before putting it on here (if select people want to work on it I'd be happy to share in a small group). However, this is quite tiny; just 2 models (users, spaces).

All models are stored and saved as 'spaces'. The spreadsheet content is all stored as json in Postgres. You can see the full requests if you look at the network tab in chrome.

However, while there are a few third party systems, everything will still work with just guesstimate-app, as long as you don't try to log in or save. In practice this means that you can do quite a bit of development, as you can edit any model on the site (just can't save them). It also makes much development quite simple when it's just on the website (not the server). The line that controls this is here:

"start": "BUILD_DEV=0 NODE_ENV=development API_ENV=production webpack-dev-server"

API_ENV=production (as opposed to development) means that it will use the production APIs.

@OAGr
Copy link
Member

OAGr commented Jan 5, 2016

How to run ( I think, can't try right now)

git clone git@github.com:getguesstimate/guesstimate-app.git
cd guesstimate-app
npm install
npm install rimraf lodash.assign lodash.pick find-root autoprefixer
npm run start

There are often errors with specific things, but it depends on what is already installed on the computer. Later we could put it in a docker container or something.

@OAGr
Copy link
Member

OAGr commented Jan 5, 2016

I'm happy to answer specific questions as they are raised.

In terms of the tech stack, the app is mostly React and Redux. Most code in src. Most of it follows one or two organizational patterns, but it's a bit inconsistent in places, especially in the router lib and with regards to the stylesheets. Would love to clean it up sometimes, but if people have specific concerns I would be happy to help there.

@paultag
Copy link
Author

paultag commented Jan 5, 2016

Sweet, thanks! I might formulate that into a HACKING markdown file :)

@OAGr
Copy link
Member

OAGr commented Jan 7, 2016

For now I just put this in the README.md file
https://github.com/getguesstimate/guesstimate-app/blob/master/README.md

@OAGr OAGr closed this as completed Jun 16, 2016
@OAGr
Copy link
Member

OAGr commented Jun 16, 2016

Closing for now. We could definitely improve what we have, but I believe this is sufficient for now. If anyone wants more specific things, please say so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants