BookCompany
Technologies & Features
- Angular front-end framework
- Firebase back-end real-time NoSQL cloud database
- RESTful APIs: Google Maps & New York Times.
- NgRx state management
- Google Registrar
Table of Contents
- What is BookCompany?
- Integrated REST APIs
- Authentication
- User Profile
- Personal Collection
- Getting Started
- Development Server
- Tests
- Build
- Author
What is BookCompany?
BookCompany is a web app to store the right book, song, or even podcast for every moment on your personal collection.
Integrated REST APIs
Architectural style for an application program interface (API) that uses HTTP requests to access and use data.
Google Maps Platform
Dynamic and interactive maps, location, and geospatial experiences for the app. Click Google Maps Platform to get started with the Google Cloud Console to manage services, credentials, billing, APIs, and SDKs.
Maps JavaScript API and Places API
Users can search for landmarks associated with their favorite books or songs without having to leave the app. The Places API contains location data for over 200 million places and autocomplete. With the Maps JavaScript API, the autocomplete mechanism is integrated with the map.
Directions API
The Directions API is a web service that uses an HTTP request to return JSON or XML-formatted directions between landmarks and important locations for driving, cycling, transit, and walking.
New York Times Books API
The Books API provides information about book reviews and the New York Times Best Sellers lists.
Book Reviews
The book reviews service lets users search NYT book reviews by author.
Best Sellers List
The best sellers service returns a list of Times best sellers list (for hardcover-fiction) updated weekly.
Authentication
Token-based authentication and Firebase Authentication SDK are integrated into this app to provide methods to create and manage users.
Login
Token-based Authentication
- Login Requested
- Dispatch
LOGIN Requested
action - Add action
- Add effect (to dispatch either
LOGIN Success
orAuthError
)
- Dispatch
- Login Success
- Dispatch
LOGIN Success
action - Add reducer (to create new state)
- Authentication state
isLoggedIn
is set to true and token and email added to the user object during successful log-ins. - Authentication state
isLoading
is set to false.
- Authentication state
- Add effect (to add token to localStorage and redirect user)
- Returns an observable identical to the source.
- Updates online status to true.
- Dispatch
- Login Failed
- Dispatch
AuthError
action - Add reducer (to create new state)
- Dispatch
Firebase Authentication
- Generate auth service and user interface files to create a Firebase authentication system with Angular.
- Use auth service to create login authentication with Angular and Firebase.
- Social logins using Firebase’s Google and Twitter auth provider.
Register
Token-based
- Register Requested
- Dispatch
REGISTER Requested
action - Add action
- Add effect (to dispatch either
REGISTER Completed
orAuthError
)
- Dispatch
- Register Completed
- Add action
- switchMap to
LOGIN Success
andUpdate Profile
- Register Failed
- Dispatch
AuthError
action
- Dispatch
User Registration with Angular Firebase
- Use auth service for user registration with Angular and Firebase.
- Sign up using Firebase’s Google and Twitter auth provider.
User Profile
Profile section to change username and profile picture, look up calendar events, or simply update profile status.
Personal Collection
Main section to allow users to store their projects in their own collection.
Projects
Create
Update
Delete
Getting Started
Preconditions
- Google Maps API Key
- New York Times API Key Auth
- Firebase Cloud Console Account
- Node and npm
Installation
cd bookcompany
npm install
Development Server
Run npm start
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Tests
Unit tests
- Run
ng test
to execute the unit tests via Karma.
End-to-end tests
- Run
ng e2e
to execute the end-to-end tests via Protractor.
Build
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Author
Rodrigo E. Bravo