Skip to content

Commit 3e08e96

Browse files
authored
Merge pull request #155 from oslabs-beta/master
ReacType 3.0 merge from OSLabs beta fork
2 parents dd24825 + 1671d60 commit 3e08e96

File tree

160 files changed

+7170
-8086
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+7170
-8086
lines changed

.babelrc

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
{
2-
"presets": [
2+
"plugins": [
33
[
4-
"env",
4+
"module-resolver",
55
{
6-
"modules": false
6+
"cwd": "babelrc",
7+
"alias": {
8+
"Components": "./app/src/components",
9+
"Containers": "./app/src/containers"
10+
}
711
}
8-
],
9-
"react",
10-
"stage-0",
12+
]
1113
],
12-
"plugins": ["transform-es2015-modules-commonjs"],
13-
"env": {
14-
"test": {
15-
"plugins": ["transform-es2015-modules-commonjs"]
16-
}
17-
}
14+
// presets are a set of of plug-ins
15+
"presets": [
16+
"@babel/preset-typescript",
17+
"@babel/preset-env",
18+
"@babel/preset-react"
19+
]
1820
}

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ $RECYCLE.BIN/
158158

159159
#VSCode
160160
.vscode/
161+
reactype.code-workspace
161162

162163
# User-specific files
163164
*.suo
@@ -485,4 +486,14 @@ ASALocalRun/
485486
reactype.dmg
486487
installers/
487488

489+
# for server key and ssl certificate generation
490+
server/domains.ext
491+
server/localhost.crt
492+
server/localhost.csr
493+
server/localhost.key
494+
server/RootCA.crt
495+
server/rootCA.key
496+
server/rootCA.pem
497+
server/RootCA.srl
498+
488499
# End of https://www.gitignore.io/api/node,linux,macos,windows,visualstudio,yarn

.travis.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
language: node_js
22
node_js:
3-
- 10
3+
- "10"
4+
dist: trusty
5+
cache:
6+
directories:
7+
- node_modules
8+
install:
9+
- npm install
10+
- npm run prod-build
11+
script:
12+
- npm run test
13+

CODE_OF_CONDUCT.md

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
- The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
All complaints will be reviewed and investigated promptly and fairly.
62+
63+
All community leaders are obligated to respect the privacy and security of the
64+
reporter of any incident.
65+
66+
## Enforcement Guidelines
67+
68+
Community leaders will follow these Community Impact Guidelines in determining
69+
the consequences for any action they deem in violation of this Code of Conduct:
70+
71+
### 1. Correction
72+
73+
**Community Impact**: Use of inappropriate language or other behavior deemed
74+
unprofessional or unwelcome in the community.
75+
76+
**Consequence**: A private, written warning from community leaders, providing
77+
clarity around the nature of the violation and an explanation of why the
78+
behavior was inappropriate. A public apology may be requested.
79+
80+
### 2. Warning
81+
82+
**Community Impact**: A violation through a single incident or series
83+
of actions.
84+
85+
**Consequence**: A warning with consequences for continued behavior. No
86+
interaction with the people involved, including unsolicited interaction with
87+
those enforcing the Code of Conduct, for a specified period of time. This
88+
includes avoiding interactions in community spaces as well as external channels
89+
like social media. Violating these terms may lead to a temporary or
90+
permanent ban.
91+
92+
### 3. Temporary Ban
93+
94+
**Community Impact**: A serious violation of community standards, including
95+
sustained inappropriate behavior.
96+
97+
**Consequence**: A temporary ban from any sort of interaction or public
98+
communication with the community for a specified period of time. No public or
99+
private interaction with the people involved, including unsolicited interaction
100+
with those enforcing the Code of Conduct, is allowed during this period.
101+
Violating these terms may lead to a permanent ban.
102+
103+
### 4. Permanent Ban
104+
105+
**Community Impact**: Demonstrating a pattern of violation of community
106+
standards, including sustained inappropriate behavior, harassment of an
107+
individual, or aggression toward or disparagement of classes of individuals.
108+
109+
**Consequence**: A permanent ban from any sort of public interaction within
110+
the community.
111+
112+
## Attribution
113+
114+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
115+
version 2.0, available at
116+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
117+
118+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
119+
enforcement ladder](https://github.com/mozilla/diversity).
120+
121+
[homepage]: https://www.contributor-covenant.org
122+
123+
For answers to common questions about this code of conduct, see the FAQ at
124+
https://www.contributor-covenant.org/faq. Translations are available at
125+
https://www.contributor-covenant.org/translations.

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 ReacType
3+
Copyright (c) 2020 ReacType
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

README.md

+42-53
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,59 @@
1-
21
<p align="center">
32
<img width="50" src="https://github.com/team-reactype/ReacType/blob/master/src/public/icons/png/256x256.png?raw=true">
43
<h1 align="center">ReacType </h1>
54
</p>
65

7-
86
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/team-reactype/ReacType/pulls)
97
![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
10-
![Release: 2.0](https://img.shields.io/badge/Release-2.0-orange)
11-
8+
![Release: 3.0](https://img.shields.io/badge/Release-3.0-orange)
129

13-
**ReacType** is a visual prototyping tool for developers employing **React** component architecture alongside the comprehensive type checking of **TypeScript**.
10+
**ReacType** is a visual prototyping tool for developers employing **React** component architecture alongside the comprehensive type checking of **TypeScript**.
1411
In other words, **you can draw prototypes and export React / Typescript code!**
1512

16-
**ReacType** allows the user to _visualize_ their application architecture dynamically, employing a _canvas display_, an _application tree_, and a _real-time component code preview_. The user can create components and load _instances_ of these components, as well as nested HTML elements, onto the canvas. This architecture can then be _exported_ as TypeScript application files to be used as a starter template for any repository.
13+
**ReacType** allows the user to _visualize_ their application architecture dynamically, employing a _drag-and-drop canvas display_ and a _real-time component code preview_. The user can create components and drag _instances_ of these components, as well as HTML elements, onto the canvas. This architecture can then be _exported_ as TypeScript application files to be used as a starter template for any repository.
1714

18-
**New with version 2.0:**
19-
- React Native mode for iOS/Android app design
20-
- Hooks integration with functional components
21-
- History navigation
22-
- Tutorial mode
23-
- New keyboard shortcuts
24-
- Editable code preview
25-
- Prop value designation for component children
15+
**New with version 3.0:**
16+
17+
- Export code as a [Next.js](https://nextjs.org/) project
18+
- Create nestable components/HTML elements using a drag-and-drop canvas
19+
- Add CSS to any element on the canvas
20+
- Components and HTML canvas elements are rendered in the canvas in the same way they'll be rendered in the exported project
21+
- View dynamically generated Next.js or classic React code as you build your project
22+
- Authenticate with Github or email
23+
- Save data for multiple projects in the cloud
24+
- Critical Electron security gaps resolved
2625

2726
Download for [MacOS](https://github.com/team-reactype/ReacType/releases), [Windows](https://github.com/team-reactype/ReacType/releases/), [Linux](https://github.com/team-reactype/ReacType/releases/).
2827

29-
* **Mac users**: for now you might need to go to your security settings to allow the app run on your system as we do not have an Apple license yet.
28+
- **Mac users**: for now you might need to go to your security settings to allow the app run on your system as we do not have an Apple license yet.
3029

31-
* **Linux users**: run the application as a super user in order to read and write files.
30+
- **Linux users**: run the application as a super user in order to read and write files.
3231

33-
![Image of ReacType Application](https://i.imgur.com/OgcP9II.png)
32+
![Gif of adding](https://i.imgur.com/nOeuuU6.gif)
3433

3534
### How to use
3635

37-
- Open the application to start a new project. It will open in the root App component, with its name listed in the left panel and the component represented by the white box on the canvas.
38-
- Switch to React Native mode to change the interface to a mobile app development environment
39-
- To add a new component, type its name in the upper left panel, in the field '**Add class component**', and press enter.
40-
- To render a component **_instance_** to the screen, first select the component, or _parent_, that the instance will be rendered within. This selected component will be represented in a new canvas view, with its own white box. Then press the plus button next to the component name. An instance, or _child_, representation will appear on the canvas.
41-
- To add draggable **HTML elements**, select the image icons on the lower left panel.
42-
43-
![Gif of adding](https://i.imgur.com/hdVTFcP.gif)
44-
45-
- The bottom panel allows the user to toggle between 4 different views: a **tree diagram of the application**, a **real-time preview of the exportable code**, a form to enter component props, and a form to add HTML attributes.
46-
47-
- **_Props_** can be added to each component within its tab on bottom panel. Enter in a _key-value pair_, select its data _type_ and press the bottom 'ADD PROP'.
48-
- **_HTML Element Attributes_** of class name and ID can be added to each HTML element after an HTML element has been rendered to the canvas.
49-
50-
![Gif of attr & props](https://i.imgur.com/cmgOLLN.gif)
51-
52-
- To **_delete_** a _child_ or instance from the canvas, select the desired instance and either press the _delete_ key.
53-
- To **_delete_** a _component_, click the 'DELETE' button of the desired component in the left panel.
54-
- To _start over_, select the blue 'CLEAR WORKSPACE' button in the left panel. This will **clear the entire application**.
55-
56-
### To Export Files
57-
58-
- Once finished setting up the application template, press the green 'EXPORT PROJECT' button at the bottom of the left panel and choose between two options to export your files:
59-
1. Export the component files into a components folder. This option will allow a developer to add these files to an existing project.
60-
1. Export a new project with TypeScript config files and the component files. This option will allow a developer to immediately begin a new project.
36+
- **Log in:** Sign up through email/Github if you would like to save your projects to the cloud. Otherwise, select _Continue as Guest_
37+
- **Selectproject type:** By default, new projects will be Next.js projects, but you can toggle your project to be a normal React application by selecting "Classic React" in the bottom-right corner.
38+
- **Next.js** projects allow you to easily create routing between pages within ReacType and render content with static rendering.
39+
- **Classic React** projects are vanilla React. You can create multiple "root" components, but routing between these root components is enabled by default.
40+
- **Add components:** Add a new component in the left panel. If the _Page_ checkbox is selected, the component will become a page that can be routed to. For example, a page component named 'Home', the component's corresponding route will be '/Home'. [Learn more about Next.js routing](https://nextjs.org/docs/routing/introduction).
41+
- **Create instances of components/HTML elements:** Each component has its own canvas where you can see how any instances of nested components or HTML elements will render in production. To create an instance of a component or traditional HTML element in the canvas, simply drag it onto the canvas. The following elements have special properties when they're dragged onto the canvas:
42+
- **Page/root components:** Page/root components cannot be dragged into other components.
43+
- **Divs:** Divs are arbitrarily nestable.
44+
- **Navigation components:** Next.js projects have "Navigation components" which allow you to create links between your page components.
45+
- **Update CSS and delete instances:** Click on the component canvas or an instance to view/edit CSS attributes in the right panel. Updates made to the CSS will render in the canvas on _Save_.
46+
- **Save your project:** Select _Save Project_ to save a new project to the cloud. Once you've created a new project in the cloud, it will be autoamtically saved on each change. You can open any of your other saved projects by selecting _Open Project_.
47+
- **Export your project:** Select _Export Project_ to save your project locally. You will have the option of exporting either a fully functional application or only exporting the component files.
6148

6249
#### Contributors
6350

51+
[Aaron Bumanglag](https://www.linkedin.com/in/akbuma) [@akbuma](https://github.com/akbuma)
52+
6453
[Adam Singer](https://linkedin.com/in/adsing) [@spincycle01](https://github.com/spincycle01)
6554

55+
[Andrew Cho](https://www.linkedin.com/in/andrewjcho84/) [@andrewjcho84](https://github.com/andrewjcho84)
56+
6657
[Charles Finocchiaro](https://www.linkedin.com/in/charles-finocchiaro-62440040/) [@null267](https://github.com/null267)
6758

6859
[Chelsey Fewer](https://www.linkedin.com/in/chelsey-fewer/) [@chelseyeslehc](https://github.com/chelseyeslehc)
@@ -71,6 +62,8 @@ Download for [MacOS](https://github.com/team-reactype/ReacType/releases), [Windo
7162

7263
[Eliot Nguyen](https://linkedin.com/in/ibeeliot) [@ibeeliot](https://github.com/ibeeliot)
7364

65+
[Fredo Chen](https://www.linkedin.com/in/fredochen/) [@fredosauce](https://github.com/fredosauce)
66+
7467
[Jesse Zuniga](https://linkedin.com/in/jesse-zuniga) [@jzuniga206](https://github.com/jzuniga206)
7568

7669
[Mitchel Severe](https://www.linkedin.com/in/misevere/) [@mitchelsevere](https://github.com/mitchelsevere)
@@ -89,35 +82,31 @@ Download for [MacOS](https://github.com/team-reactype/ReacType/releases), [Windo
8982

9083
[Tony Ito-Cole](https://linkedin.com/in/tony-ito-cole) [@tonyito](https://github.com/tonyito)
9184

85+
[Tyler Sullberg](https://www.linkedin.com/in/tyler-sullberg) [@tsully](https://github.com/tsully)
86+
9287
## To Run Your Own Version
9388

9489
- **Fork** and **Clone** Repository.
9590
- Open project directory
9691
- Install dependencies
9792

98-
- npm works in place of yarn as well.
99-
10093
```bash
101-
yarn install
94+
npm install
10295
```
10396

104-
- Run application
97+
- To run the production build
10598

10699
```bash
107-
yarn start
100+
npm run prod
108101
```
109102

110-
- For development experience, in one terminal...
103+
- To run the development build
111104

112105
```bash
113-
yarn run dev
106+
npm run dev
114107
```
115108

116-
- and on another terminal
117-
118-
```bash
119-
yarn run electron
120-
```
109+
- Please note that the development build is not connected to the production server. To develop with a development server, clone the [ReacType server repo](https://github.com/andrewjcho84/ReacTypeServer). Alternatively, you can also select "Continue as guest" on the log-in page of the app to not use any features that rely on the server (authentication and saving project data.)
121110

122111
## License
123112

__mocks__/electron.ts

-6
This file was deleted.

0 commit comments

Comments
 (0)