title: How a fully scalable SPA with a solid backend is built
body: <p>the past few weeks I've been hard at work with Angular, Node, TDD, Heroku, Amazon S3 etc. Trying to get a better picture of how a fully scalable SPA with a solid backend is built, working with grunt, bower, haven't dipped my toes in TDD using Jasmine yet, though I understand how the tests are being made through Karma, this is supposedly my next step.</p>
  
  <p>One thing is sure: <strong>IT IS A LOT OF INFORMATION</strong></p>
  
  <hr>
  
  <h2>On to the Questions/Rationale on working with all these technologies.</h2>
  
  <p>First things first, I played with </p>
  
  <ul>
  <li>Angular App <a href="https://github.com/angular-app/angular-app" rel="noreferrer">https://github.com/angular-app/angular-app</a></li>
  <li>NG Boilerplate <a href="https://github.com/joshdmiller/ng-boilerplate" rel="noreferrer">https://github.com/joshdmiller/ng-boilerplate</a></li>
  </ul>
  
  <p>and read many dozens of posts etc.</p>
  
  <p>I found NG Boilerplate to be most logical structured (as far as my understanding of these things go).</p>
  
  <p>As a demo project (which evolved from something really small) I want to make a Single Page CRUD Application using:</p>
  
  <ul>
  <li>NodeJS as backend</li>
  <li>Express as a web app framework</li>
  <li>NG Boilerplate as the Client</li>
  <li>The app deployed to Heroku</li>
  <li>MongoDB for DB</li>
  <li>Amazon S3 for dynamic storage</li>
  </ul>
  
  <p>Now I want to use Angular-Apps's (<a href="https://github.com/angular-app/angular-app" rel="noreferrer">https://github.com/angular-app/angular-app</a>) server as a backend to my NGBoilerplate kickstarter</p>
  
  <p>I want to know how: </p>
  
  <ul>
  <li>from what I see the client connects directly to MongoDB?</li>
  <li>how does the angular client communicate back and forth to express ?</li>
  <li>I read an interesting article <a href="http://www.espeo.pl/2012/02/26/authentication-in-angularjs-application" rel="noreferrer">http://www.espeo.pl/2012/02/26/authentication-in-angularjs-application</a> related to how the authentication works.</li>
  </ul>
  
  <hr>
  
  <h2>Long Story Short, without me asking a ton of questions, could someone please describe in detail the workflow of such an app? Getting the session, login, access to editing the content, tying express routes to angular routes (e.g. X route can be accessed by the admin only) etc. ##</h2>
  
  <p>there'a big blur in my head :).</p>