Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
puzansakya committed Feb 17, 2019
0 parents commit f53d48a
Show file tree
Hide file tree
Showing 360 changed files with 20,111 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mode=prod
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/server/build
/server/uploads
/uploads
/tmp
/out-tsc

# dependencies
/node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
2 changes: 2 additions & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
web: npm run serve:ssr
release: knex migrate:latest && knex seed:run
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Connection with heroku postgres
Heroku postgres requires following properties to be configured in driver
```
ssl:true
sslFacctory:org.postgresql.ssl.NonValidatingFactory
```

# Heroku commands
```
heroku login
heroku run bash
git push heroku master
git remote add heroku 'reponame.git'
```

# Seeding
Seed file is available in 'server/documentation' folder.

# Puzanssr

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.0.6.

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## 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.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).


## SSR
Following file are added or modified inorder to achieve server side rendering.
```
- [modified] app.module.ts
- [added] app.server.module.ts
- [added] main.server.ts
- [added] tsconfig.server.json
- [modified] angular.json
- [added] server.ts
- [added] webpack.server.config.ts (mode should be none and optimizer should be false)
```
147 changes: 147 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"puzanssr": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/browser",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "puzanssr:build"
},
"configurations": {
"production": {
"browserTarget": "puzanssr:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "puzanssr:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist/server",
"main": "src/main.server.ts",
"tsConfig": "src/tsconfig.server.json"
}
}
}
},
"puzanssr-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "puzanssr:serve"
},
"configurations": {
"production": {
"devServerTarget": "puzanssr:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "puzanssr"
}
124 changes: 124 additions & 0 deletions db.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"articles": [
{
"id": 1,
"heading": "Hear, There, and Everywhere",
"description": "Facebook Design in conversation with co-authors Fuchsia MacAree and Scott Boms on their book and the importance of listening",
"backdrop": "https://facebook.design/public/images/hear-there-and-everywhere.png",
"type": "article",
"category": "Process",
"author": "Facebook Design",
"avatar": "https://facebook.design/public/images/facebookdesign.jpeg"
},
{
"id": 2,
"heading": "An Unforgettable Valentine’s Day",
"description": "A product design intern’s resource for design students and romantics",
"backdrop": "https://facebook.design/public/images/an-unforgettable-valentines-day.png",
"type": "article",
"category": "careers",
"author": "Caterina Beleffi",
"avatar": "https://facebook.design/public/images/avatars/caterina.jpeg"
},
{
"id": 3,
"heading": "Able, Allowed, Should; Navigating Modern Tech Ethics",
"description": "I want to share a talk I gave on the design track at SXSW in early March of this year. This talk was inspired by a deeply held belief that we are at a critical time in my company...",
"backdrop": "https://facebook.design/public/images/able-allowed-should-navigating-modern-tech-ethics.png",
"type": "article",
"category": "Process",
"author": "Margaret Gould Stewart",
"avatar": "https://facebook.design/public/images/avatars/margaret.jpg"
},
{
"id": 4,
"heading": "Designing New Ways to Give Context to News Stories",
"description": "When scrolling through News Feed, it’s sometimes difficult to judge the credibility of an article. As with all information on the internet, if we’re unfamiliar with an article’s source...",
"backdrop": "https://facebook.design/public/images/designing-new-ways-to-give-context-to-news-stories.png",
"type": "article",
"category": "case studies",
"author": "Jeff Smith",
"avatar": "https://facebook.design/public/images/avatars/jeff.jpg"
},
{
"id": 5,
"heading": "Meditation and Design at Facebook",
"description": "How does a routine meditation practice benefit us as designers? What is it about Facebook that creates an environment that encourages meditation and mindfulness? And how can other companies do the same?",
"backdrop": "https://facebook.design/public/images/meditation-and-design-at-facebook.png",
"type": "article",
"category": "culture",
"author": "Garron Engstrom",
"avatar": "https://facebook.design/public/images/avatars/garron.png"
},
{
"id": 6,
"heading": "Designing Against Misinformation",
"description": "Scrolling through News Feed, it can be hard to judge what stories are true or false. Should you trust everything that you see, even if it comes from someone whom you don’t know well?... ",
"backdrop": "https://facebook.design/public/images/designing-against-misinformation.png",
"type": "article",
"category": "case studies",
"author": "Jeff Smith",
"avatar": "https://facebook.design/public/images/avatars/jeff.jpg"
},
{
"id": 7,
"heading": "The Enterprising Designer: Beyond Consumer Product Design",
"description": "Which is better: A career in consumer product design or a career in enterprise product design?",
"backdrop": "https://facebook.design/public/images/the-enterprising-designer-beyond-consumer-product-design.png",
"type": "article",
"category": "careers",
"author": "Siva Sabaretnam",
"avatar": "https://facebook.design/public/images/avatars/siva.jpg"
},
{
"id": 8,
"heading": "One Year Designing at WhatsApp",
"description": "Thoughts on how WhatsApp and Facebook design at scale",
"backdrop": "https://facebook.design/public/images/one-year-designing-at-whatsapp.png",
"type": "article",
"category": "case studies",
"author": "Charlie Deets",
"avatar": "https://facebook.design/public/images/avatars/charlie.jpg"
},
{
"id": 9,
"heading": "Evolving the Facebook News Feed to Serve You Better",
"description": "Starting late last year, we set out to explore how we could make News Feed more readable, conversational, and easier to navigate...",
"backdrop": "https://facebook.design/public/images/evolving_the_facebook_news_feed_to_serve_you_better.jpg",
"type": "article",
"category": "case studies",
"author": "Ryan Freitas",
"avatar": "https://facebook.design/public/images/avatars/42D08C09-0D5E-4887-A26A-F2DCEF0A95B0.jpeg"
},
{
"id": 10,
"heading": "How to Enhance Mobile Interactions with Sound Design",
"description": "When I talk to people about sound design and the role it plays at Facebook, many people seem puzzled at first. “Sound? Facebook?”...",
"backdrop": "https://facebook.design/public/images/sound-design-and-enhancing-mobile-interactions-at-facebook.jpg",
"type": "article",
"category": "case studies",
"author": "Will Littlejohn",
"avatar": "https://facebook.design/public/images/avatars/will.jpg"
},
{
"id": 11,
"heading": "Questions to Ask as a New Designer on the Team",
"description": "Last summer I switched teams at Facebook. My first project seemed simple enough: redesign the sign up flow for Facebook Lite, an app for low-end Android phones.",
"backdrop": "https://facebook.design/public/images/questions-to-ask-as-a-new-designer-on-the-team.png",
"type": "article",
"category": "process",
"author": "Jason Cashdollar",
"avatar": "https://facebook.design/public/images/avatars/jason.jpg"
},
{
"id": 12,
"heading": "Tips for Becoming a Design Leader",
"description": "One of the things I love about working at Facebook is the emphasis we put on personal growth and the objectives people have for their careers...",
"backdrop": "https://facebook.design/public/images/avatars/andrewl.png",
"type": "article",
"category": "careers",
"author": "Andrew Lucas-Walsh",
"avatar": "https://facebook.design/public/images/tips-for-becoming-a-design-leader.png"
}
]
}
Loading

0 comments on commit f53d48a

Please sign in to comment.