2018-03-10 02:29:00 +00:00
[![Build Status ](https://travis-ci.org/metamaps/metamaps-ui.svg?branch=master )](https://travis-ci.org/metamaps/metamaps-ui)
2016-07-31 18:51:06 +00:00
2018-03-11 20:24:57 +00:00
Make sure you're running a good up to date LTS version of `node`
Install all the dependencies
`$ npm install`
2016-07-31 18:51:06 +00:00
2018-03-08 23:45:22 +00:00
Make sure you have `node-sass` installed
`$ npm install -g node-sass`
2016-07-31 18:51:06 +00:00
2018-03-11 20:24:57 +00:00
Make sure that you have a .env file setup. You can copy the .example-env
```
$ cp .example-env .env
```
Edit it however you need to.
Start up the nodejs server which serves the UI files, the socketio realtime server, and proxies requests to the API.
2018-03-03 20:57:02 +00:00
```
2018-03-11 20:24:57 +00:00
$ npm start
2018-03-04 03:52:41 +00:00
```
2018-03-11 22:33:36 +00:00
Build the css. If you're developing and writing css, make sure that it will rebuild the css when you make changes, by running the `npm sass:watch` process and leaving it running.
2018-03-05 00:30:17 +00:00
```
2018-03-11 22:33:36 +00:00
$ npm run sass # to build the css once
$ npm run sass:watch # to watch it for more changes
2018-03-05 00:30:17 +00:00
```
2018-03-11 20:24:57 +00:00
Run the metamaps api in another terminal, on whichever port you configured in your .env file.
2018-03-08 23:45:22 +00:00
For now, make sure you are running on the `add-user-route` branch of Metamaps, and that it's up to date with the latest on that branch
2018-03-06 13:58:28 +00:00
`$ rails s -p 3001`
2018-03-08 23:45:22 +00:00
open up http://localhost:3000 and start coding!
2018-03-06 13:58:28 +00:00
Checklist
- [x] Get the Import lightbox working, and not conflicting on screen
- [x] Handling CSRF
- [x] Fix images referenced in the JS
- [x] Figure out how authentication of requests from the frontend to the API works
- [x] Figure out how to combine the nodejs realtime server into server.js
2018-03-07 23:41:04 +00:00
- [x] Notifications: make sure loading states are working for popup and page
2018-03-08 14:46:05 +00:00
- [x] Request unreadNotificationCount
- [x] Request invite code
- [x] Request user object itself
- [x] Load the metacodes
2018-03-08 15:43:39 +00:00
- [x] move ImportDialog lightbox into main app
2018-03-08 15:22:11 +00:00
- [x] create topic form
2018-03-08 17:09:23 +00:00
- [x] Fork map lightbox / component
2018-03-08 15:43:39 +00:00
2018-03-08 23:35:47 +00:00
- [ ] fix other places where metacode sets are used
- [ ] make newtopic form load metacodes from users selected ones
2018-03-08 14:46:05 +00:00
- [ ] create synapse form
2018-03-08 15:43:39 +00:00
- [ ] replace old loader with react loader
- [ ] ensure exports of maps work
2018-03-07 20:35:27 +00:00
- [ ] Notifications: make sure notifications either look nice, or redirect
- [ ] Notifications: pagination
2018-03-07 23:41:04 +00:00
- [ ] Notifications: Request unreadNotificationCount
2018-03-07 23:42:47 +00:00
- [ ] Notifications: CSS fixes related to 'controller-x' in body classes
2018-03-07 23:41:04 +00:00
- [ ] Make sure loading state for explore maps pages work
2018-03-06 13:58:28 +00:00
- [ ] Get actioncable working
2018-03-08 12:26:04 +00:00
- [ ] lightboxes
- [ ] About lightbox
2018-03-08 14:46:05 +00:00
- [ ] Switch Metacodes lightbox / component
2018-03-08 12:26:04 +00:00
- [ ] break up index.html into parts
2018-03-06 13:58:28 +00:00
- [ ] Handle CSS metacode colors
- [ ] Fix Request An Invite page
- [ ] Make 'new map' action work
- [ ] Modify the remaining rails templates into JSX templates
2018-03-07 20:35:27 +00:00
- [x] notifications list
- [x] notification page
2018-03-08 18:15:33 +00:00
- [x] list metacodes
2018-03-10 00:30:55 +00:00
- [x] new metacode
- [x] edit metacode
2018-03-08 18:15:33 +00:00
- [x] list metacode_sets
2018-03-09 20:53:46 +00:00
- [x] new metacode set
- [x] edit metacode set
2018-03-06 13:58:28 +00:00
- [ ] authorized apps
- [ ] registered apps
- [ ] authorize
- [ ] user passwords
- [ ] Modify the RubyOnRails app to only serve JSON responses, no HTML pages anymore
- [ ] Modify the frontend to request that data from the API which is necessary at first to load the page
2018-03-08 23:35:47 +00:00
- [x] Load the metacode sets
2018-03-08 23:45:22 +00:00
To run the server as a daemon that will be re-run if it crashes, you can
use the forever node package.
```
$ npm install -g forever
$ forever start server.js
2018-03-11 22:33:36 +00:00
```
To build the javascript file
`$ npm run build`