Skip to content

Commit 1aa8749

Browse files
committed
Reorganize assets and finalize developer README
1 parent 8fc70af commit 1aa8749

File tree

12 files changed

+11
-143
lines changed

12 files changed

+11
-143
lines changed

archive/MyMovie.gif

-1.49 MB
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

assets/hooks-demo.gif

634 KB
Loading

assets/recoil-demo.gif

1.54 MB
Loading

src/README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
33
## Brief
44
Our mission at Reactime is to maintain and iterate constantly, but never at the expense of future developers.<br />We know how hard it is to quickly get up to speed and onboard in a new codebase.<br />So, here are some helpful pointers to help you hit the ground running. 🏃🏾💨
55

6-
### Main Structure
6+
## Main Structure
77

88
In the *src* folder, there are three directories we care about: *app*, *backend*, and *extension*.
99
```
1010
src/
1111
├── app/ # Frontend code
12-
│ │ #
1312
│   ├── __tests__/ #
1413
│   ├── actions/ # Redux action creators
1514
│   ├── components/ # React components
1615
│   ├── constants/ #
1716
│   ├── containers/ # More React components
1817
│   ├── reducers/ # Redux mechanism for updating state
1918
│   ├── styles/ #
20-
│   ├── index.tsx # App component
19+
│   ├── user_id/ # Mixpanel data collection code
20+
│   ├── index.tsx # Starting point for root App component
2121
│   ├── module.d.ts #
2222
│   └── store.tsx #
2323
24-
├── backend/ # "Backend" code
25-
│ #
24+
├── backend/ # "Backend" code (injected into target app)
25+
   │ # Focus especially on linkFiber, timeJump, tree, and helpers
2626
│   ├── __tests__/ #
2727
│   ├── types/ # Typescript interfaces
2828
│   ├── helpers.js #
@@ -33,17 +33,14 @@ src/
3333
│   ├── module.d.ts #
3434
│   ├── package.json #
3535
│   ├── puppeteerServer.js #
36-
│   ├── readme.md #
37-
│   ├── timeJump.ts # Rerenders DOM based on snapshot from background
36+
│   ├── timeJump.ts # Rerenders DOM based on snapshot from background script
3837
│   └── tree.ts # Custom structure to send to background
3938
4039
├── extension/ # Chrome Extension code
40+
│   ├── build/ # Destination for bundles and manifest.json (Chrome config file)
4141
│ │ #
42-
│   ├── build/ # Destination for bundles
43-
│   │ # and manifest.json (Chrome config file)
44-
│ │ #
45-
│   ├── background.js #
46-
│   └── contentScript.ts #
42+
│   ├── background.js # Chrome Background Script
43+
│   └── contentScript.ts # Chrome Content Script
4744
└──
4845
```
4946

@@ -84,11 +81,11 @@ Still unsure about what contents scripts and background scripts do for Reactime,
8481
- In other words, a background script works as a sort of middleman, directly maintaining connection with its parent extension, and acting as a proxy enabling communication between it and the content script.
8582

8683

87-
### Data Flow
84+
## Data Flow
8885

8986
The general flow of data is described in the following steps:
9087

91-
![demo](../archive/AppStructureDiagram.png)
88+
![demo](../assets/AppStructureDiagram.png)
9289

9390
1. When the background bundle is loaded by the browser, it executes a script injection into the dom. (see section on *backend*). This script uses a technique called [throttle](https://medium.com/@bitupon.211/debounce-and-throttle-160affa5457b) to send state data from the app to the content script every specified milliseconds (in our case, this interval is 70ms).
9491

0 commit comments

Comments
 (0)