Skip to content

Commit 5f6ed84

Browse files
committed
feat: add docs
1 parent fb4062b commit 5f6ed84

File tree

6 files changed

+293
-57
lines changed

6 files changed

+293
-57
lines changed

README.md

Lines changed: 18 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,32 @@
1-
# Getting Started with Create React App
1+
<div align="center">
22

3-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
3+
# Stackinflow
44

5-
## Available Scripts
5+
> A Web App for Question & Answer about tech
66
7-
In the project directory, you can run:
7+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/Sunny-unik/stackinflow)
88

9-
### `npm start`
9+
</div>
1010

11-
Runs the app in the development mode.\
12-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
11+
## Tech Stack
1312

14-
The page will reload if you make edits.\
15-
You will also see any lint errors in the console.
13+
- Node/Express for server
14+
- React for frontend
15+
- Mongodb for database
1616

17-
### `npm test`
17+
## 🤝 Contributing
1818

19-
Launches the test runner in the interactive watch mode.\
20-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
19+
We encourage you to contribute to Stackinflow! All contributors are required to abide by our [Code of Conduct](/docs/Code-of-conduct.md). Please check out the [Contributing guide](/docs/Contributing.md) for guidelines about how to proceed with your contribution.
20+
Feel free for start discussion.
2121

22-
### `npm run build`
22+
## Project Setup
2323

24-
Builds the app for production to the `build` folder.\
25-
It correctly bundles React in production mode and optimizes the build for the best performance.
24+
For development setup read [getting started guide](/docs/Getting-started-guide.md)
2625

27-
The build is minified and the filenames include the hashes.\
28-
Your app is ready to be deployed!
26+
# Deployment
2927

30-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
28+
This website is deployed on [render](https://render.com)
3129

32-
### `npm run eject`
30+
## ⚖️ LICENSE
3331

34-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
35-
36-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37-
38-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
39-
40-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
41-
42-
## Learn More
43-
44-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45-
46-
To learn React, check out the [React documentation](https://reactjs.org/).
47-
48-
### Code Splitting
49-
50-
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51-
52-
### Analyzing the Bundle Size
53-
54-
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55-
56-
### Making a Progressive Web App
57-
58-
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59-
60-
### Advanced Configuration
61-
62-
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63-
64-
### Deployment
65-
66-
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67-
68-
### `npm run build` fails to minify
69-
70-
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
32+
MIT © [Sunny-unik/Stackinflow](LICENSE)

client/README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Getting Started with Create React App
2+
3+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4+
5+
## Available Scripts
6+
7+
In the project directory, you can run:
8+
9+
### `npm start`
10+
11+
Runs the app in the development mode.\
12+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
13+
14+
The page will reload if you make edits.\
15+
You will also see any lint errors in the console.
16+
17+
### `npm test`
18+
19+
Launches the test runner in the interactive watch mode.\
20+
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21+
22+
### `npm run build`
23+
24+
Builds the app for production to the `build` folder.\
25+
It correctly bundles React in production mode and optimizes the build for the best performance.
26+
27+
The build is minified and the filenames include the hashes.\
28+
Your app is ready to be deployed!
29+
30+
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31+
32+
### `npm run eject`
33+
34+
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
35+
36+
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37+
38+
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
39+
40+
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
41+
42+
## Learn More
43+
44+
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45+
46+
To learn React, check out the [React documentation](https://reactjs.org/).
47+
48+
### Code Splitting
49+
50+
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51+
52+
### Analyzing the Bundle Size
53+
54+
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55+
56+
### Making a Progressive Web App
57+
58+
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59+
60+
### Advanced Configuration
61+
62+
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63+
64+
### Deployment
65+
66+
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67+
68+
### `npm run build` fails to minify
69+
70+
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

docs/Code-of-conduct.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
id: code-of-conduct
3+
title: Code of Conduct
4+
sidebar_label: Code of Conduct
5+
keywords:
6+
- code of conduct
7+
---
8+
9+
## Our pledge
10+
11+
In the interest of fostering an open and welcoming environment, we as
12+
contributors and maintainers pledge to make participation in our project and
13+
our community a harassment-free experience for everyone, regardless of age, body
14+
size, disability, ethnicity, gender identity and expression, level of experience,
15+
nationality, personal appearance, race, religion, or sexual identity and
16+
orientation.
17+
18+
## Our standards
19+
20+
Examples of behavior that contributes to creating a positive environment
21+
include:
22+
23+
- Using welcoming and inclusive language
24+
- Being respectful of differing viewpoints and experiences
25+
- Gracefully accepting constructive criticism
26+
- Focusing on what is best for the community
27+
- Showing empathy towards other community members
28+
29+
Examples of unacceptable behavior by participants include:
30+
31+
- The use of sexualized language or imagery and unwelcome sexual attention or
32+
advances
33+
- Trolling, insulting/derogatory comments, and personal or political attacks
34+
- Public or private harassment
35+
- Publishing others' private information, such as a physical or electronic
36+
address, without explicit permission
37+
- Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Our responsibilities
41+
42+
Project maintainers are responsible for clarifying the standards of acceptable
43+
behavior and are expected to take appropriate and fair corrective action in
44+
response to any instances of unacceptable behavior.
45+
46+
Project maintainers have the right and responsibility to remove, edit, or
47+
reject comments, commits, code, wiki edits, issues, and other contributions
48+
that are not aligned to this Code of Conduct, or to ban temporarily or
49+
permanently any contributor for other behaviors that they deem inappropriate,
50+
threatening, offensive, or harmful.
51+
52+
## Scope
53+
54+
This Code of Conduct applies both within project spaces and in public spaces
55+
when an individual is representing the project or its community. Examples of
56+
representing a project or community include using an official project e-mail
57+
address, posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event. Representation of a project may be
59+
further defined and clarified by project maintainers.
60+
61+
## Enforcement
62+
63+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
64+
reported by contacting the project team at <sunnygandhwani027@gmail.com>. All
65+
complaints will be reviewed and investigated and will result in a response that
66+
is deemed necessary and appropriate to the circumstances. The project team is
67+
obligated to maintain confidentiality with regard to the reporter of an incident.
68+
Further details of specific enforcement policies may be posted separately.
69+
70+
Project maintainers who do not follow or enforce the Code of Conduct in good
71+
faith may face temporary or permanent repercussions as determined by other
72+
members of the project's leadership.
73+
74+
## Attribution
75+
76+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
77+
available at [https://contributor-covenant.org/version/1/4][version]
78+
79+
[homepage]: https://contributor-covenant.org
80+
[version]: https://contributor-covenant.org/version/1/4/

docs/Contributing.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Contributing
2+
3+
Thanks for your interest in contributing to Stackinflow.
4+
Contributions are always welcome, no matter how large or small.
5+
6+
If you wish to contribute code, to get started we recommend first reading our [Getting Started Guide](Getting-started-guide.md).
7+
8+
All other documentation for contributors can be found [in the docs directory](./).
9+
10+
## Guidelines
11+
12+
Before contributing, please read the [code of conduct](./code-of-conduct.md) and follow the directions below:
13+
14+
### Recommended Communication Style
15+
16+
1. Always leave screenshots for visual changes.
17+
2. Always leave a detailed description in the Pull Request. Leave nothing ambiguous for the reviewer.
18+
3. Always review your code first. Be sure to run the project locally and test before asking for a review.
19+
4. Always communicate in the GitHub repository. Whether it is in the issue or the pull request, keeping the lines of communication open and visible to everyone on the team helps everyone around you.
20+
21+
### Applying Lint Styleguide
22+
23+
#### To check the code for linting errors, run the following command
24+
25+
```shell
26+
npm run lint
27+
```
28+
29+
To fix the linting errors, run the following command:
30+
31+
```shell
32+
npm run lint:fix
33+
```
34+
35+
These commands use [ESLint](https://eslint.org/) to check and fix the code.
36+
37+
#### To check the code for formatting errors, run the following command
38+
39+
```shell
40+
npm run prettier
41+
```
42+
43+
To fix the formatting errors, run the following command:
44+
45+
```shell
46+
npm run prettier:fix
47+
```
48+
49+
These commands use [Prettier](https://prettier.io/) to check and fix the code.
50+
51+
Linting and formatting errors will also be displayed during development, but won't prevent the code from compiling.
52+
53+
If you forget to run this command, automated pre-commit checks will also run these commands, but the commit will be blocked if there are any errors.
54+
55+
## Pull requests
56+
57+
**_We actively welcome your pull requests, however linking your work to an existing issue is preferred._**
58+
59+
1. Fork the repo as [explained here](./Getting-started-guide.md) and create your branch from the default branch.
60+
2. Name your branch something that is descriptive to the work you are doing. i.e. adds-new-thing or fixes-mobile.
61+
3. If you make visual changes, screenshots are required.
62+
4. If you make the existing code better, please let us know in your PR description.
63+
5. A PR description and title are required. The title is required to begin with: "feat:" or "fix:"
64+
6. [Link to an issue](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) in the project. Unsolicited code is welcomed, but an issue is required for an announcement your intentions. PR's without a linked issue will be marked invalid and closed.
65+
66+
### PR Titles
67+
68+
Examples for valid PR titles:
69+
70+
- fix: Correct typo.
71+
- feat: Add support for Node 12.
72+
- refactor: Drop support for Node 6.
73+
74+
_Note that since PR titles only have a single line, you have to use the ! syntax for breaking changes._
75+
76+
See [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for more examples.
77+
78+
## Issues
79+
80+
If you wish to work on an open issue, please get assign yourself to an issue before beginning work on it to avoid conflicts. For assign an issue to yourself comment on the issue `/attempt #issueNumber` to let us know that you want to work on this issue. Maintainer will check that issue is assigned to anyone else if not then maintainer assigned issue to you.
81+
82+
In case you get stuck, please feel free to ask for help in the [Github Discussions](https://github.com/Sunny-unik/Stackinflow/discussions/categories/q-a).

docs/Getting-started-guide.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Getting Started Guide
2+
3+
## Prerequisite
4+
5+
1. Node installed on your machine.
6+
2. MongoDB URI to connect with Database.
7+
3. Check `extensions.json` file in .vscode directory so me of these extensions are required for maintain code consistency.
8+
9+
## Setup
10+
11+
1. [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the [Stackinflow](https://github.com/Sunny-unik/Stackinflow) to your own GitHub account.
12+
2. Clone the forked repository to your local machine.
13+
3. Create `.env` file and fill environment variables as following written in `.env.example` file.
14+
4. Goto server then run `npm i` to install the dependencies for server
15+
5. Goto server then run `npm i` to install the dependencies for frontend.
16+
17+
## Development
18+
19+
To run development server on your local machine, navigate inside server directory then run:
20+
21+
```shell
22+
npm run watch
23+
```
24+
25+
To run development frontend on your local machine, navigate inside client directory then run:
26+
27+
```shell
28+
npm start
29+
```
30+
31+
## Building
32+
33+
To generate a production-ready version of your code, run:
34+
35+
```shell
36+
npm run build
37+
```
38+
39+
To test production-ready version of your code, run:
40+
41+
```shell
42+
npm start
43+
```

server/Procfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)