Skip to content

Commit 49dac62

Browse files
committed
updated README to new structure
1 parent f67a784 commit 49dac62

File tree

1 file changed

+20
-74
lines changed

1 file changed

+20
-74
lines changed

README.md

Lines changed: 20 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<p align="center">
2-
<img src="app/images/logos/Angular2RxJSChatHeaderImage.png" alt="Angular 2 RxJS Chat" width="500" height="300"/>
2+
<img src="src/assets/images/logos/Angular2RxJSChatHeaderImage.png" alt="Angular 2 RxJS Chat" width="500" height="300"/>
33
</p>
44

55
# Angular 2 RxJS Chat [![Join the chat at https://gitter.im/ng-book/ng-book](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ng-book/ng-book?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
66

7-
> An Angular 2 chat app using [Angular 2](https://angular.io/), [RxJS](https://github.com/Reactive-Extensions/RxJS), [Webpack](https://webpack.github.io/), [TypeScript](http://www.typescriptlang.org/), Services, Injectables, [Karma](http://karma-runner.github.io/), Forms, [SCSS](http://sass-lang.com/), and [tslint](http://palantir.github.io/tslint/) by the [ng-book 2 team](https://ng-book.com/2)
7+
> An Angular 2 chat app using [Angular 2](https://angular.io/), [RxJS](https://github.com/Reactive-Extensions/RxJS), [Angular CLI](https://github.com/angular/angular-cli), [Webpack](https://webpack.github.io/), [TypeScript](http://www.typescriptlang.org/), Services, Injectables, [Karma](http://karma-runner.github.io/), Forms, and [tslint](http://palantir.github.io/tslint/) by the [ng-book 2 team](https://ng-book.com/2)
88
99
This repo shows an example chat application using RxJS and Angular 2. The goal is to show how to use the Observables data architecture pattern within Angular 2. It also features:
1010

11-
* Webpack configuration with TypeScript, Karma, SCSS, and tslint
11+
* Angular CLI, which configures Webpack with TypeScript, Karma, and tslint
1212
* Writing async components that work with RxJS
1313
* How to write injectable services in Angular 2
1414
* And much more
1515

1616
<p align="center">
17-
<img src="app/images/readme/full-chat-preview.png" alt="Angular 2 RxJS Chat" width="800" height="577"/>
17+
<img src="src/assets/images/readme/full-chat-preview.png" alt="Angular 2 RxJS Chat" width="800" height="577"/>
1818
</p>
1919

2020
> Try the live [demo here](http://rxjs.ng-book.com)
@@ -32,37 +32,37 @@ cd angular2-rxjs-chat
3232
npm install
3333

3434
# run
35-
npm run go
35+
npm start
3636
```
3737

38-
Then visit [http://localhost:8080](http://localhost:8080) in your browser.
38+
Then visit [http://localhost:4200](http://localhost:4200) in your browser.
3939

4040
## Architecture
4141

4242
The app has three models:
4343

44-
* [`Message`](app/ts/models.ts#L27) - holds individual chat messages
45-
* [`Thread`](app/ts/models.ts#L12) - holds metadata for a group of `Message`s
46-
* [`User`](app/ts/models.ts#L3) - holds data about an individual user
44+
* [`Message`](src/app/message/message.model.ts) - holds individual chat messages
45+
* [`Thread`](src/app/thread/thread.model.ts) - holds metadata for a group of `Message`s
46+
* [`User`](src/app/user/user.model.ts) - holds data about an individual user
4747

4848
<p align="center">
49-
<img src="app/images/readme/rx-chat-models.png" alt="Model Diagram" width="500" height="119"/>
49+
<img src="src/assets/images/readme/rx-chat-models.png" alt="Model Diagram" width="500" height="119"/>
5050
</p>
5151

5252
And there are three services, one for each model:
5353

54-
* [`MessagesService`](app/ts/services/MessagesService.ts) - manages streams of `Message`s
55-
* [`ThreadsService`](app/ts/services/ThreadsService.ts) - manages streams of `Thread`s
56-
* [`UserService`](app/ts/services/UserService.ts) - manages a stream of the current `User`
54+
* [`MessagesService`](src/app/message/messages.service.ts) - manages streams of `Message`s
55+
* [`ThreadsService`](src/app/thread/threads.service.ts) - manages streams of `Thread`s
56+
* [`UserService`](src/app/user/users.service.ts) - manages a stream of the current `User`
5757

5858
There are also three top-level components:
5959

60-
* [`ChatNavBar`](app/ts/components/ChatNavBar.ts) - for the top navigation bar and unread messages count
61-
* [`ChatThreads`](app/ts/components/ChatThreads.ts) - for our clickable list of threads
62-
* [`ChatWindow`](app/ts/components/ChatWindow.ts) - where we hold our current conversation
60+
* [`ChatNavBar`](src/app/chat-nav-bar/chat-nav-bar.component.ts) - for the top navigation bar and unread messages count
61+
* [`ChatThreads`](src/app/chat-threads/chat-threads.component.ts) - for our clickable list of threads
62+
* [`ChatWindow`](src/app/chat-window/chat-window.component.ts) - where we hold our current conversation
6363

6464
<p align="center">
65-
<img src="app/images/readme/rx-chat-top-level-components.png" alt="Angular 2 RxJS Chat" width="500" height="360"/>
65+
<img src="src/assets/images/readme/rx-chat-top-level-components.png" alt="Angular 2 RxJS Chat" width="500" height="360"/>
6666
</p>
6767

6868
## Services Manage Observables
@@ -87,64 +87,10 @@ This app implements a few simple chat bots. For instance:
8787
* Reversing bot
8888
* Waiting bot
8989

90-
<img src="app/images/readme/rx-chat-echo-bot.png" alt="Angular 2 RxJS Chat Bots" width="346" height="348"/>
90+
<img src="src/assets/images/readme/rx-chat-echo-bot.png" alt="Angular 2 RxJS Chat Bots" width="346" height="348"/>
9191

9292
<div style="clear:both"></div>
9393

94-
## File Structure
95-
96-
Here's an overview of how the files are laid out in this project:
97-
98-
```
99-
angular2-rxjs-chat/
100-
├── Makefile * Easy access to common tasks
101-
├── README.md * This file
102-
├── app/ * Where our application code is stored
103-
│ ├── css/ * Contains our CSS and SCSS files
104-
| |
105-
│ ├── images/ * Stores app images
106-
| |
107-
│ ├── index.html * HTML entry point
108-
| |
109-
│ ├── ts/ * All of our TypeScript is here
110-
| | |
111-
│ │ ├── ChatExampleData.ts * Contains our bots and sample data
112-
| | |
113-
│ │ ├── app.ts * App entry point
114-
| | |
115-
│ │ ├── components/ * Components go here
116-
| | | |
117-
│ │ │ ├── ChatNavBar.ts * Nav Bar Component
118-
│ │ │ ├── ChatThreads.ts * Threads Component
119-
│ │ │ └── ChatWindow.ts * Chat Window Component
120-
| | |
121-
│ │ ├── models.ts * Our models go here
122-
| | |
123-
│ │ ├── services/ * Services here
124-
| | | |
125-
│ │ │ ├── MessagesService.ts * Manages our messages
126-
│ │ │ ├── ThreadsService.ts * Exposes our threads
127-
│ │ │ ├── UserService.ts * Manage our user
128-
│ │ │ └── services.ts * Exports all services
129-
| | |
130-
│ │ └── util/ * Pipes and various utilities
131-
| |
132-
│ ├── typings/ * Self-managed type definitions here
133-
| |
134-
│ └── vendor.js * Vendor js requires for webpack
135-
| |
136-
├── karma.conf.js * Our unit testing configuration
137-
├── package.json * Our javascript dependencies
138-
├── test/ * Our tests go here
139-
├── test.bundle.js * Some hacks to get TypeScript tests
140-
├── tsconfig.json * Configures the TypeScript compiler
141-
├── tsd.json * Configures tsd (type definitions packages)
142-
├── tslint.json * Configures our TypeScript linter
143-
├── typings/ * tsd managed typings
144-
├── vendor/ * Various vendored code
145-
└── webpack.config.js * Our Webpack configuration
146-
```
147-
14894
## Detailed Installation
14995

15096
**Step 1: Install Node.js from the [Node Website](http://nodejs.org/).**
@@ -168,7 +114,7 @@ npm install
168114
npm run go
169115
```
170116

171-
Then visit [http://localhost:8080](http://localhost:8080) in your browser.
117+
Then visit [http://localhost:4200](http://localhost:4200) in your browser.
172118

173119
## Running the Tests
174120

@@ -211,7 +157,7 @@ ___
211157
# ng-book 2
212158

213159
<a href="https://ng-book.com/2">
214-
<img align="right" src="app/images/readme/ng-book-2-as-book-cover-pigment.png" alt="ng-book 2" width="148" height="250" />
160+
<img align="right" src="src/assets/images/readme/ng-book-2-as-book-cover-pigment.png" alt="ng-book 2" width="148" height="250" />
215161
</a>
216162

217163
This repo was written and is maintained by the [ng-book 2](https://ng-book.com/2) team. In the book we talk about each line of code in this app and explain why it's there and how it works.

0 commit comments

Comments
 (0)