Skip to content

Commit d5d16c7

Browse files
Merge pull request #3 from existentialcoder/project_setup
Project setup
2 parents 59535bc + 02df7c6 commit d5d16c7

24 files changed

+4042
-291
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
client/**

.eslintrc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"env": {
3+
"node": true,
4+
"mocha": true
5+
},
6+
"parserOptions": {
7+
"ecmaVersion": 2018
8+
},
9+
"extends": "airbnb-base",
10+
"overrides": [
11+
{
12+
"files": [
13+
"*.js"
14+
],
15+
"rules": {
16+
"no-console": "off"
17+
}
18+
},
19+
{
20+
"files": [
21+
"*.spec.js"
22+
],
23+
"rules": {
24+
"max-lines": [
25+
"error",
26+
1500
27+
],
28+
"max-lines-per-function": [
29+
"error",
30+
1500
31+
]
32+
}
33+
}
34+
]
35+
}

.github/CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Contributing guidelines
2+
3+
- If you find a relevant issue that you can actively work on, mention it and start hacking away
4+
- Fork the repo and raise a PR that respects the [template](.github/pull_request_template.md)
5+
- Make sure you maintain a respectful decorum in comments and code

.github/pull_request_template.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
### Description
4+
<!--- Describe your changes in detail -->
5+
6+
### Motivation and Context
7+
<!--- Why is this change required? What problem does it solve? -->
8+
<!--- If it fixes an open issue, please link to the issue here. -->
9+
10+
### How Has This Been Tested?
11+
<!--- Please describe in detail how you tested your changes. -->
12+
<!--- Include details of your testing environment, tests ran to see how -->
13+
<!--- your change affects other areas of the code, etc. -->
14+
15+
### Screenshots, if any
16+
17+
### Types of changes
18+
19+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
20+
- [ ] Bug fix (non-breaking change which fixes an issue)
21+
- [ ] New feature (non-breaking change which adds functionality)
22+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
23+
24+
### Scope of the changes
25+
- [ ] User Interface
26+
- [ ] APIs
27+
28+
### Other checks
29+
30+
- [ ] My code follows the coding style of this project
31+
- [ ] I added unit tests that covers my code
32+
- [ ] I made sure there are no linter errors

README.md

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,72 @@
66

77
> Manage your node projects from user interface
88
9-
### RATIONALE
9+
## RATIONALE
10+
1011
* **No**de **P**roject **M**anager sounded very close to **Nopalm**(also sounding similar to `Napalm` :)). Hence the name!
1112
* I always faced difficulties in searching a relevant package while working on a node project and heavily craved for an UI since coming back and forth between browser and terminal killed productivity
12-
* To solve this, I thought of developing a <span style="color:#12344d; font-weight: bold">Nopalm (Node Project Manager)</span> with an exciting web user interface to search, install and uninstall packages from a single place
13+
* To solve this, I thought of developing <span style="color:#12344d; font-weight: bold">Nopalm (Node Project Manager)</span> with an exciting web user interface to search, install and uninstall packages from a single place
1314
* You can also scaffold a **new node project**
1415
* This project is heavily inspired from [Vue-UI](https://cli.vuejs.org/dev-guide/ui-api.html)
1516

16-
### USAGE
17+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app)
18+
19+
## USAGE
20+
1721
* Install the npm package globally and run the local server inside any node project directory / empty directory
1822
```shell
1923
npm i -g nopalm
2024
cd /path/to/target_dir && nopalm
2125
```
2226
* Visit [http://localhost:8001](http://localhost:8001) to start managing your node project
2327

24-
### To test locally
25-
##### Pre installed requirements
28+
## To run locally
29+
30+
#### Pre installed requirements
2631
- **node > 10**
2732
- **npm** or **yarn**
28-
##### Steps
33+
#### Steps
2934
* Clone the repository
30-
* Go to the **`client/`** folder and create **`.env.development.local`** and copy the following content
35+
* Install packages in `client` and `server`
36+
```shell
37+
npm i
38+
39+
cd client/
40+
npm i
41+
```
42+
**To run the development version**
43+
* Add this **.env** file in the `/client` folder
3144
```shell
32-
REACT_APP_API_BASE_URL='http://localhost:8001'
45+
echo "REACT_APP_API_BASE_URL='http://localhost:8001'" >> .env.development.local`
3346
```
3447
* Run the react client
3548
```shell
3649
cd client
37-
npm i
3850
npm run start
39-
* To run in an existing node project, go to the that particular directory and run this command
51+
* Run the server in an existing node project
4052
```shell
53+
cd /path/to/target_node_project
4154
npm run dev --prefix /path/to/nopalm
4255
```
43-
* Run the same command in an empty directory to create new node project !
44-
* Visit [http://localhost:3000](http://localhost:3000) to run this in development mode
56+
* Visit [https://localhost:3000](https://localhost:3000)
57+
**To run the production version**
58+
* Build the UI and run the server alone
59+
```shell
60+
cd client/
61+
62+
<!-- Build the React client -->
63+
npm run build
64+
65+
<!-- cd to target node project -->
66+
cd /path/to/target_node_project
67+
68+
npm run start --prefix /path/to/nopalm
69+
```
70+
* Visit [https://localhost:8001](https://localhost:8001)
71+
* Follow the same steps for testing in `empty directory`
72+
73+
## Testing APIs
74+
75+
Once you run the node server you might find [this](lib/collection/README.md) interesting to test it using Postman
76+
77+
## [Contributing Guidelines](.github/CONTRIBUTING.md)

client/.eslintrc

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"browser": true,
5+
"es2020": true
6+
},
7+
"extends": [
8+
"plugin:react/recommended",
9+
"standard"
10+
],
11+
"parserOptions": {
12+
"ecmaFeatures": {
13+
"jsx": true
14+
},
15+
"ecmaVersion": 11,
16+
"sourceType": "module"
17+
},
18+
"plugins": [
19+
"react"
20+
],
21+
"settings": {
22+
"react": {
23+
"version": "detect"
24+
}
25+
},
26+
"parser": "babel-eslint",
27+
"rules": {
28+
"semi": [2, "always"],
29+
"react/prop-types": [0, "never"]
30+
}
31+
}

0 commit comments

Comments
 (0)