|-- client/
| |-- app.js
| |
| +-- index.html
| |
| +-- assets/
| | |
| |
| +-- styles/
| | |
| |
| +-- app/
| |-- features/
| | |-- auth/
| | | |-- login.html
| | | +-- auth.js
| | |
| | +-- chat/
| | | |-- chat.html
| | | +-- chat.js
| |
| +-- services/
| |-- authFactory.js
| |
| +-- encryptionFactory.js
|
+-- extension/
| |
|
+-- server/
| |-- server.js
| |
| +-- routes.js
| |
| +-- socketHandler.js
| |
| |-- features/
| |-- auth/
| | |-- passport.js
| |
| +-- users/
| | |-- userController.js
| | +-- userModel.js
| | +-- userRoutes.js
- AngularJS
- Socket.io
Configures the Angular app injecting all factories and controllers. Configures the $stateProvider for the different views.
Main HTML container for html views. Loads all JavaScript dependencies.
HTML view for login and signup
authController for login.html view. Invokes login and signup methods in authFactory
HTML view for main chat view. Contains html views for friends list, adding friends, current chat log, and logging out.
chatController to handle all chat and friends activity.
authFactory to handle all authentication API calls
- api/users/login
- api/users/signup
- api/users/signedin
encryptionFactory
- encryptMessage()
- decryptMessage()
- generateOptions() | generates options used for generating a public/private keypair
- generateKeyPair()
socketFactory returns a socket.io socket to be used to communicate with the server
- NodeJS
- Express
- PassportJS
- Socket.io
- Mongoose
Main server file. Run with node.
Manages socket events and emits.
Configures PassportJS local strategy
Controller for all user methods
Defines the user model
Routes for api/users/*
Needed for integrating external chat services