• Stars
    star
    107
  • Rank 322,821 (Top 7 %)
  • Language
    JavaScript
  • Created over 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Seed project for Angular Pro final application

Angular Pro: Final App Seed

Seed app for fitness manager application using Angular v4+ and AngularFire2.



This repo serves as the seed project for the Ultimate Angular Pro course as well as the final solution in a separate branch, come and learn advanced Angular architecture!

Setup and install | Tasks | Snippets | Firebase Config | Resources

Setup and install

Fork this repo from inside GitHub so you can commit directly to your account, or simply download the .zip bundle with the contents inside.

Dependency installation

During the time building this project, you'll need development dependencies of which run on Node.js, follow the steps below for setting everything up (if you have some of these already, skip to the next step where appropriate):

  1. Download and install Node.js here for Windows or for Mac.
  2. Install Firebase CLI on the command-line with npm install -g firebase-tools

That's about it for tooling you'll need to run the project, let's move onto the project install.

Project installation and server

Now you've pulled down the repo and have everything setup, using the terminal you'll need to cd into the directory that you cloned the repo into and run some quick tasks:

cd <angular-pro-app>
yarn install
# OR
npm install

This will then setup all the development and production dependencies we need.

Now simply run this to boot up the server:

yarn start
# OR
npm start

Tasks

A quick reminder of all tasks available:

Development server

yarn start
# OR
npm start

Production build (compile AoT)

yarn build:production
# OR
npm run build:production

Deploying to Firebase

You'll need to ensure you're logged into Firebase first (if you are prompted, otherwise skip to next step):

firebase login

To deploy (after running build task):

firebase deploy

Snippets

Here are some VSCode snippets I'm using whilst recording this application, these help speed up boilerplate creation for things such as components, modules and services.

Here's how to install the snippets in VSCode. Add them to typescript.json when prompted for which language the snippets are for.

{
  "@Component": {
    "prefix": "@Component",
    "description": "Creates a component definition",
    "body": [
      "import { Component } from '@angular/core';",
      "",
      "@Component({",
      "\tselector: '${1:selector-name}',",
      "\tstyleUrls: ['${1:selector-name}.component.scss'],",
      "\ttemplate: `",
      "\t\t<div>",
      "\t\t\t",
      "\t\t</div>",
      "\t`",
      "})",
      "export class ${3:Name}Component {",
      "\tconstructor() {}",
      "}"
    ]
  },
  "@Injectable": {
    "prefix": "@Injectable",
    "description": "Creates an @Injectable service",
    "body": [
      "import { Injectable } from '@angular/core';",
      "",
      "@Injectable()",
      "export class ${1:Name}Service {",
      "\tconstructor() {}",
      "}"
    ]
  },
  "@NgModule": {
    "prefix": "@NgModule",
    "description": "Creates an @NgModule",
    "body": [
      "import { NgModule } from '@angular/core';",
      "",
      "@NgModule({",
      "\timports: [],",
      "\tdeclarations: [],",
      "\tproviders: []",
      "})",
      "export class ${1:Name}Module {}"
    ]
  },
  "@Pipe": {
    "prefix": "@Pipe",
    "description": "Creates an @Pipe",
    "body": [
      "import { Pipe, PipeTransform } from '@angular/core';",
      "",
      "@Pipe({",
      "\tname: '${1:selector-name}'",
      "})",
      "export class ${2:Name}Pipe implements PipeTransform {",
      "\ttransform(value: any) {",
      "\t\t$0",
      "\t}",
      "}"
    ]
  }
}

Firebase Config

database.rules.json

{
  "rules": {
    "users": {
      "$uid": {
        ".read": "$uid === auth.uid",
        ".write": "$uid === auth.uid"
      }
    },
    "schedule": {
      "$uid": {
        ".read": "$uid === auth.uid",
        ".write": "$uid === auth.uid",
        ".indexOn": [
          "timestamp"
        ]
      }
    },
    "meals": {
      "$uid": {
        ".read": "$uid === auth.uid",
        ".write": "$uid === auth.uid"
      }
    },
    "workouts": {
      "$uid": {
        ".read": "$uid === auth.uid",
        ".write": "$uid === auth.uid"
      }
    }
  }
}

firebase.json

{
  "database": {
    "rules": "database.rules.json"
  },
  "hosting": {
    "public": "",
    "ignore": [
      "firebase.json",
      ".firebaserc",
      ".vscode",
      ".git",
      ".gitignore",
      ".editorconfig",
      "src/**/.*",
      "database.rules.json",
      "package.json",
      "README.md",
      "tsconfig.json",
      "webpack.config.js",
      "yarn.lock",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  }
}

Resources

There are several resources used inside this project, of which you can read further about to dive deeper or understand in more detail what they are:

More Repositories

1

ngx-errors

A declarative validation errors module for reactive forms.
TypeScript
470
star
2

angular-pro-src

Source code for the "Angular Pro" course.
TypeScript
335
star
3

angular-fundamentals-src

Source code for the "Angular Fundamentals" course.
TypeScript
252
star
4

vault

Typed localStorage and sessionStorage utility with data structure and prefix support.
TypeScript
178
star
5

redux-store

Vanilla TypeScript example of a Redux Store
TypeScript
169
star
6

angular-fundamentals-seed

Angular Fundamentals seed project
JavaScript
143
star
7

angular-tesla-range-calculator

Building Tesla's battery range calculator with Angular 2+ reactive forms
TypeScript
96
star
8

javascript-basics

๐Ÿ† Starter project for JavaScript Basics
CSS
83
star
9

ultimate-angular-master-seed

Seed project for the "Ultimate Angular 1.x Pro" course.
JavaScript
73
star
10

typescript-masterclass-src

TypeScript Masterclass. Advanced TypeScript, comprehensively covered in real-world digestable chapters.
TypeScript
72
star
11

angular-lazy-load-demo

Lazy loading: code-splitting with @โ€‹NgModules demo
TypeScript
69
star
12

ultimate-angular-master-src

Source code for "Ultimate Angular 1.x Pro" course material
JavaScript
62
star
13

typescript-basics-seed

Seed project for TypeScript Basics course
HTML
56
star
14

ultimate-angular-starter-src

Source code for "Ultimate Angular 1.x Fundamentals" course:
HTML
55
star
15

typescript-basics-src

TypeScript Basics. Our comprehensive introduction to static types in JavaScript.
JavaScript
53
star
16

lite-store

Reactive Stores with entities and frozen state, without the headache
TypeScript
49
star
17

ultimate-angular-starter-seed

The starter project for the "Ultimate Angular 1.x Fundamentals" course
CSS
38
star
18

ngx-fullscreen

Angular Directive that implements the Fullscreen API.
TypeScript
35
star
19

node-express-typescript

A minimal starter project to write your Node.js apps in TypeScript, complete with local and production build scripts.
TypeScript
35
star
20

angular-1-performance-src

Source code for AngularJS Performance course
JavaScript
30
star
21

javascript-masterclass

๐Ÿ† Starter project for JavaScript Masterclass
CSS
24
star
22

javascript-html5-apis

๐Ÿ† Starter project for JavaScript HTML5 APIs
JavaScript
20
star
23

javascript-dom

๐Ÿ† Starter project for the JavaScript DOM course
CSS
18
star
24

ngx-pagevisibility

TypeScript
15
star
25

angular-basics-src

TypeScript
15
star
26

javascript-dom-project

๐Ÿ† Starter project for the JavaScript DOM course project build
CSS
14
star
27

react-basics

๐Ÿ† Starter project for React Basics [Create React App]
JavaScript
14
star
28

angular-basics-seed

Angular Basics (v15) Course Seed Project
TypeScript
12
star
29

typescript-masterclass-seed

Seed project for TypeScript Masterclass course
JavaScript
10
star
30

html-css-basics

๐Ÿ† Starter project for the HTML + CSS Basics course
CSS
10
star
31

ultimate-react-icecream

UltimateCourses demo React app
JavaScript
10
star
32

rxjs-basics

๐Ÿ† Starter project for RxJS Basics and Masterclass courses
CSS
9
star
33

react-router-src

JavaScript
7
star
34

react-state-management-course

JavaScript
6
star
35

react-router-seed

Learn React Router v6 ๐Ÿงญ
JavaScript
5
star
36

react-basics-src

Source code for React Basics
JavaScript
4
star