Skip to content

Commit 243c44e

Browse files
maestromacbenhalpern
authored andcommitted
Update Docs [ci skip] (forem#656)
* Move frontend doc [ci skip] * Fix DEV styling [ci skip] * Update table of contents [ci skip] * Move stuffs around [ci skip] * Move stuffs around [ci skip] * Add gitdocs integration * Mess with title again [ci-skip] * Add root readme back in * Update docs/readme as a new readme * Messing with title again * Add where to get help [ci skip] * Fix dev connect link [ci skip] * Move how to get help [ci skip] * Add TODO to empty headers * Add more TODOs and clean up a link * Add sloan * Update prereqs to specify we use macOS * Add gitdocs build to test on Netlify * Update README [ci skip] * Add .gitdocs_build/ to .gitignore [ci skip] * Create netlify.toml * Update docs with logo and more docs * Update gitdocs name * Add redirects for netlify * Remove extraneous redirects from netlify * Add more README TODOs [ci skip] * Update root directory of gitdocs * Move ISSUE_TEMPLATE to .github/ [ci skip] * Testing new base for netlify * Update README [ci skip] * Rename index.md to readme.md for GitHub * Move gitdocs.json to docs folder * Add GPL LICENSE [ci skip] * tweak readme * update license language * Update FAQ with some Q and A * Add some traffic control for docs readme * add license faq and core team members * Add new line to fix list * Add AGPL-3 Adding the GNU AFFERO GENERAL PUBLIC LICENSE. * Update GPL License * Additional documentation for PostgreSQL setup
1 parent e899cbb commit 243c44e

15 files changed

+1076
-130
lines changed
File renamed without changes.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ node_modules/
3232
/app/assets/javascripts/generated/*
3333
latest.dump
3434
.byebug_history
35+
.gitdocs_build/
3536

3637
# Ignore application configuration
3738
/config/application.yml

LICENSE.md

Lines changed: 660 additions & 4 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 121 additions & 126 deletions
Large diffs are not rendered by default.

docs/.gitdocs.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "dev.to Docs",
3+
"root": "./",
4+
"logo": "devblacksquarelogo.svg",
5+
"header_links": [
6+
{
7+
"title": "Repo",
8+
"href": "https://github.com/thepracticaldev/dev.to",
9+
"target": "_blank"
10+
},
11+
{
12+
"title": "dev.to",
13+
"href": "https://dev.to",
14+
"target": "_blank"
15+
}
16+
]
17+
}

docs/.static/devblacksquarelogo.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/additional_postgres_setup.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Setup your application with PostgreSQL -
2+
Follow these links for detailed the installation guide.
3+
1. Mac OS - [setup](https://postgresapp.com/)
4+
2. Linux / Ubuntu -
5+
- Ubuntu `14.04` - [setup](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-14-04)
6+
- Ubuntu `16.04 and higher` - [setup](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04)
7+
3. Windows - [setup](https://www.postgresql.org/download/windows/)
8+
9+
##### You can find all installation packages for different operating systems [here](https://www.postgresql.org/download/).
10+
11+
##### After installation -
12+
1. If your Rails app is unable to connect to the PostgreSQL, then update your `database.yml` file with `username` and `password`.
13+
```ruby
14+
development:
15+
<<: *default
16+
username: POSTGRESSQL_USERNAME
17+
password: POSTGRESSQL_PASSWORD
18+
test:
19+
<<: *default
20+
username: POSTGRESSQL_USERNAME
21+
password: POSTGRESSQL_PASSWORD
22+
```
23+
2. While running test cases, if you get an error message `postgresql connection timeout`. Go to your `spec/support/database_cleaner.rb` file. And rename `:truncation` with `:deletion`.
24+
25+
##### Note -
26+
1. Don't forget to set up your PostgreSQL with `username` and `password`.
27+
2. Don't commit your `database.yml` or `database_cleaner.rb` files. Or PostgreSQL `username` and `password` to any repository.
28+
3. You can use environment variables for storing `username` and `password`. You can define them inside the `application.yml` file.

docs/faq.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## How do I contribute?
2+
3+
Get started with our [`README`](https://github.com/thepracticaldev/dev.to). You can visit this set of docs for more details when you're up and running.
4+
5+
## I'm getting an error [ERROR-SOMETHING-WENT-WRONG]. Where do I report it?
6+
7+
You can [write a new issue](https://github.com/thepracticaldev/dev.to/issues/new) and let us know what exactly what went wrong. We'll be able to help you debug if we have specific information, the context of how the error happened, and any other information you think would help.
8+
9+
## How do I setup the repo with Windows/Linux/Ubuntu/not macOS?
10+
11+
Unfortunately, the core team develops only macOS right now. We don't have guidelines for other operating systems yet. If you want to get up and running on a different OS, you'll need to have the following installed:
12+
13+
- Ruby
14+
- Ruby on Rails
15+
- [PostgreSQL](https://www.postgresql.org/download/)
16+
- [Yarn](https://yarnpkg.com/en/docs/install)
17+
18+
You can use a guide like [GoRails](https://gorails.com/setup/), but since we have not tried it ourselves we can't fully endorse it. Let us know how it goes, or if you have tips or experience setting all this up! We're open to including guides for other operating systems.

docs/frontend.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## ⚛ Front-End Development
2+
3+
There is some legacy code which is old school JS, but for all things new, [Preact](https://preactjs.com) is the where it's at. If you're new to Preact, check out their [documentation](https://preactjs.com/guide/getting-started). Also, consider following the [#preact](https://dev.to/t/preact) tag on [dev.to](https://dev.to).
4+
5+
### 👷‍ Building components
6+
7+
We use [Storybook](https://storybook.js.org) to develop components. It allows you to focus on building components without the burden of the whole application running. If you're new to Storybook, check out their [documentation](https://storybook.js.org/basics/guide-react). Also, consider following the [#storybook](https://dev.to/t/storybook) tag on [dev.to](https://dev.to).
8+
9+
To get Storybook running on your local:
10+
11+
* 📦 Run `npm install` or `yarn` to ensure all your dependencies are installed.
12+
* 🏁 Run `npm run storybook` or `yarn storybook` to start Storybook.
13+
* 🏗️ Start working on your component and see the changes in Storybook as you save.

docs/get-api-keys-dev-env.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
There are a few services you'll need **_(all free)_** in order to run the development server and access the app locally. Here are the instructions for getting them:
2+
3+
# Algolia (Choose OAuth or Email Sign Up)
4+
## Algolia: OAuth Sign Up
5+
1. [Click this link and sign up for an account with either GitHub or Google.](https://www.algolia.com/users/sign_up)
6+
![screen shot 2018-05-02 at 3 06 05 pm](https://user-images.githubusercontent.com/17884966/39547183-c5d8b572-4e24-11e8-80e3-5b595e0c9999.png)
7+
2. Select your region, and then hit "Let's get started!"
8+
![screen shot 2018-05-01 at 2 30 52 pm](https://user-images.githubusercontent.com/17884966/39544263-80c7e39e-4e1b-11e8-802e-c9562bdf1b63.png)
9+
3. Skip the tutorial (or don't) and go to your dashboard.
10+
![screen shot 2018-05-01 at 12 59 06 pm](https://user-images.githubusercontent.com/17884966/39544344-c8cc4496-4e1b-11e8-8d81-d570a48a0668.png)
11+
4. Click "Go to your dashboard".
12+
13+
![screen shot 2018-05-02 at 3 45 34 pm](https://user-images.githubusercontent.com/17884966/39547238-f4ddd1ae-4e24-11e8-942b-98a01e20c632.png)
14+
15+
5. Agree to Terms and Conditions.
16+
![screen shot 2018-05-02 at 3 45 49 pm](https://user-images.githubusercontent.com/17884966/39547258-05d347fa-4e25-11e8-9335-b65c72b846af.png)
17+
18+
6. Click "API Keys" on the left navbar.
19+
20+
![screen shot 2018-05-02 at 4 24 30 pm](https://user-images.githubusercontent.com/17884966/39547400-7cdb854c-4e25-11e8-8442-7cfc1dc8bc1e.png)
21+
22+
7. Change your keys accordingly (name of Algolia key -> name of our application key):
23+
* `Application ID -> ALGOLIASEARCH_APPLICATION_ID`
24+
* `Search-Only API Key -> ALGOLIASEARCH_SEARCH_ONLY_KEY`
25+
* `Admin API KEY -> ALGOLIASEARCH_API_KEY`
26+
27+
![screen shot 2018-05-02 at 4 26 27 pm](https://user-images.githubusercontent.com/17884966/39547471-b24f2e36-4e25-11e8-9a0e-b988d6a8253f.png)
28+
29+
8. Done!
30+
31+
***
32+
***
33+
***
34+
35+
## Algolia Email Sign Up
36+
1. [Click this link and sign up for an account with your email address.](https://www.algolia.com/users/sign_up)
37+
![screen shot 2018-05-02 at 4 30 52 pm](https://user-images.githubusercontent.com/17884966/39547712-5ff9d338-4e26-11e8-98e9-83852021ba90.png)
38+
39+
2. Fill out your name and what describes you the most.
40+
![screen shot 2018-05-01 at 12 57 03 pm](https://user-images.githubusercontent.com/17884966/39547792-9a436842-4e26-11e8-9199-c320d24476fe.png)
41+
42+
3. Choose your datacenter/region closest to you.
43+
![screen shot 2018-05-01 at 12 58 36 pm](https://user-images.githubusercontent.com/17884966/39548002-3f7d2640-4e27-11e8-8701-21820d852379.png)
44+
45+
4. Skip the step asking about your project.
46+
![screen shot 2018-05-01 at 12 58 12 pm](https://user-images.githubusercontent.com/17884966/39547930-09b2af08-4e27-11e8-8c1b-d6b67d75d141.png)
47+
48+
5. Complete the onboarding flow and click "Go to dashboard".
49+
![screen shot 2018-05-01 at 12 58 48 pm](https://user-images.githubusercontent.com/17884966/39548519-dc0491dc-4e28-11e8-90e2-be014acd0a66.png)
50+
51+
6. Click "API Keys" on the left navbar.
52+
53+
![screen shot 2018-05-02 at 4 24 30 pm](https://user-images.githubusercontent.com/17884966/39547400-7cdb854c-4e25-11e8-8442-7cfc1dc8bc1e.png)
54+
55+
7. Change your keys accordingly (name of Algolia key -> name of our application key):
56+
* `Application ID -> ALGOLIASEARCH_APPLICATION_ID`
57+
* `Search-Only API Key -> ALGOLIASEARCH_SEARCH_ONLY_KEY`
58+
* `Admin API KEY -> ALGOLIASEARCH_API_KEY`
59+
60+
![screen shot 2018-05-02 at 4 26 27 pm](https://user-images.githubusercontent.com/17884966/39547471-b24f2e36-4e25-11e8-9a0e-b988d6a8253f.png)
61+
62+
8. Done!
63+
64+
That's it! You should try logging in with development, it should work. If it doesn't, let us know via an issue or in the contributors channel!
65+
66+
### _The following are optional, but are probably things you'll run into. That said, if you're working on tests and other things, you shouldn't need these._
67+
68+
### For authentication, you can choose Twitter, GitHub, or both.
69+
70+
# Twitter App
71+
1. [Click this link and sign in/sign up for a Twitter account.]((https://apps.twitter.com)) Note that your Twitter account will need a phone number linked to it in order to create an app.
72+
2. Create a new app, and fill out the form, like the following example image: ![](https://user-images.githubusercontent.com/17884966/41612665-952d4cae-73c1-11e8-8047-cf0bd03bffb6.png)
73+
74+
The only important field is the "Callback URL" `http://localhost:3000/users/auth/twitter/callback`, which redirects you properly to `localhost:3000` when signing in.
75+
76+
3. Once done, go to your app's settings, and fill in the terms of service `http://dev.to/terms` and privacy policy URL `http://dev.to/privacy`:
77+
78+
![](https://user-images.githubusercontent.com/17884966/41617044-8155387a-73cd-11e8-9e1d-f14c4652bda2.png)
79+
80+
4. Once done, go to your app's permissions, and check the "Request email addresses from users" box.
81+
![screen shot 2018-05-02 at 5 02 48 pm](https://user-images.githubusercontent.com/17884966/39549184-f2e19952-4e2a-11e8-81ad-10e06c4e8a61.png)
82+
83+
5. Change your keys accordingly: (name of Twitter key -> name of our application key):
84+
- `Access Token -> TWITTER_KEY`
85+
- `Access Token Secret -> TWITTER_SECRET`
86+
6. Done!
87+
88+
# GitHub
89+
1. [Click this link and sign in/sign up for a GitHub account.](https://github.com/settings/applications/new)
90+
2. Once signed in, create a new OAuth app. Here's an example; the URLs must match the example:
91+
![screen shot 2018-04-26 at 4 08 01 pm](https://user-images.githubusercontent.com/17884966/39329488-77cbf554-496c-11e8-941e-dd257b5223ee.png)
92+
3. Change your keys accordingly; (name of GitHub key -> name of our application key):
93+
- `Client ID -> GITHUB_KEY`
94+
- `Client Secret -> GITHUB_SECRET`
95+
4. Done!
96+
97+
# Stream
98+
1. [Sign up for an account with this link](https://getstream.io/accounts/signup/), using either your email or GitHub.
99+
100+
![stream step 1](https://user-images.githubusercontent.com/17884966/39548654-47db0f08-4e29-11e8-9cc3-c17d1b7228eb.png)
101+
102+
2. Click "View Dashboard" at the top right corner.
103+
104+
![stream step 2](https://user-images.githubusercontent.com/17884966/39548718-6f1928ca-4e29-11e8-9034-52ef1c1cc9d6.png)
105+
106+
3. **In the next page, click "Add New Feed Group".**
107+
108+
![stream step 3](https://user-images.githubusercontent.com/17884966/39548743-85bd4e44-4e29-11e8-9b6e-43567c4f7c22.png)
109+
110+
<hr>
111+
112+
4. Add a new feed group with the type "Notification" and name it `notifications` (case sensitive).
113+
114+
![stream step 4](https://user-images.githubusercontent.com/17884966/39548890-f0ad7742-4e29-11e8-84a3-ed823e720052.png)
115+
116+
5. Make sure you have a feed group with the type "Flat" and named `user` (case sensitive). You probably do, but if you don't, create one like you did with the notifications feed group.
117+
118+
6. Change your keys accordingly: (name of Stream key -> name of our application key):
119+
- `Key -> STREAM_RAILS_KEY`
120+
- `Secret -> STREAM_RAILS_SECRET`
121+
- `"https://us-east-api.stream-io-api.com/api/v1.0/" -> STREAM_URL`
122+
123+
7. Done!

0 commit comments

Comments
 (0)