Skip to content

Commit 7bd9027

Browse files
authored
feat: docs V2 (#303)
* feat: move docs images to root "images" directory * feat: update Gitpod badge in README.md file * fix(docs): architecture image path * feat(docs): link to architecture api * feat(docs): add description to frontmatter * feat(docs): convert pages with component to .mdx extension * feat(docs): move install icons to "website" repository * fix(docs): update image URL * fix(docs): heading hierarchy * feat(docs): change extension .mdx to .md * fix(docs): add import Alert component statement * feat(docs): change "yashu-mittal-on-trip.webp" * feat(docs): move "Node environment" to Architecture * feat(docs): move "Environment variables" section to config * feat(docs): improve docs for logchimp.config.json file & Environment variables in config * feat(docs): remove "Help us improve" alert from config * feat(docs): update railway installation guide * feat(docs): remove "How to add custom domain?" section from Railway FAQ * feat(docs:api): add slug to API frontmatter * feat(docs): create few guide pages * feat(docs): remove logos Ref: logchimp/website@a83c64e * fix: typo in glossary * feat: update images to webp in guide * feat(docs): add content & hero image to dashboard guide * feat(docs): create empty labs page * feat(docs): create post comments guide page
1 parent 2fcfcac commit 7bd9027

Some content is hidden

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

75 files changed

+296
-217
lines changed

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
# website
1+
# LogChimp documentation
2+
3+
This repository contains the documentation for LogChimp.
24

35
<a href="https://gitpod.io/#https://github.com/logchimp/website">
4-
<img src="https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod" alt="Gitpod ready-to-code" />
6+
<img
7+
src="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod"
8+
alt="Contribute with Gitpod"
9+
/>
510
</a>

api/glossary.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Glossary
3+
slug: /api/glossary
34
---
45

56
You can refer to this glossary page to understand the termonology used in the APIs.

api/readme.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
---
22
title: Introduction
3+
slug: /api/
34
---
45

5-
<!-- components -->
6-
7-
import Blockquote from "@/components/Blockquote"
6+
import { Alert } from "../../src/components/Documentation/Alert.tsx"
87

98
LogChimp uses REST APIs to build the backend on which it delivers content to the client side.
109

11-
<Blockquote type="warning">
10+
<Alert type="warning">
1211
Oops, we didn’t find time to fill this page. Writing documentation needs attention to detail, a great understanding of the project and time to write. Though LogChimp is used by lots of people all around the world, it’s still a side project for us. Let’s change that and make open source our full-time job! <a href="https://github.com/sponsors/logchimp">Become a sponsor!</a>
13-
</Blockquote>
12+
</Alert>
1413

1514
This API documentation is for v1.
1615

api/setup-guide.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Setup guide
3+
slug: /api/setup-guide
34
---
45

56
## Path & Version

api/v1/auth/login.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Login
33
method: POST
4+
slug: /api/v1/auth/login
45
---
56

67
```

api/v1/auth/readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Auth
3+
slug: /api/v1/auth/
34
---
45

56
### Endpoints

api/v1/auth/signup.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Signup
33
method: POST
4+
slug: /api/v1/auth/signup
45
---
56

67
```

api/v1/errors.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Errors
3+
slug: /api/v1/errors
34
---
45

56
Learn more about common error codes and how to resolve them.

api/v1/posts/create-post.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Create posts
33
method: POST
4+
slug: /api/v1/posts/create-post
45
---
56

67
```

api/v1/posts/delete-post-by-id.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Delete post by ID
33
method: DELETE
4+
slug: /api/v1/posts/delete-post-by-id
45
---
56

67
```

api/v1/posts/filter-post.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: GET posts
33
method: GET
4+
slug: /api/v1/posts/filter-post
45
---
56

67
```

api/v1/posts/get-post-by-slug.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Get post by slug
33
method: GET
4+
slug: /api/v1/posts/get-post-by-slug
45
---
56

67
Fetch all posts

api/v1/posts/readme.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Posts
3+
slug: /api/v1/posts
34
---
45

56
The Posts API enables you to do more than just CRUD operations.
@@ -8,10 +9,10 @@ Posts is the primary resource in a LogChimp. Using the posts endpoint it is poss
89

910
- [Filter posts](#filter-post)
1011

11-
<!-- | `GET` | [`/post/{slug}`](/api/v1/post/get-post-by-slug) |
12+
| `GET` | [`/post/{slug}`](/api/v1/post/get-post-by-slug) |
1213
| `POST` | [`/post/create`](/api/v1/post/create-post) |
1314
| `PATCH` | [`/post/update/{postId}`](/api/v1/post/update-post-by-id) |
14-
| `DELETE` | [`/post/delete`](/api/v1/post/delete-post-by-id) | -->
15+
| `DELETE` | [`/post/delete`](/api/v1/post/delete-post-by-id) |
1516

1617
#### Filter posts
1718

api/v1/posts/update-post-by-id.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: updatePostById
33
method: PATCH
4+
slug: /api/v1/posts/update-post-by-id
45
---
56

67
```

docs/architecture/api.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
title: APIs
3+
description: At its core, LogChimp is powered by RESTful JSON API.
34
slug: /docs/architecture/api
45
---
56

6-
At its core, LogChimp is powered by RESTful JSON API.
7-
87
At its core, LogChimp is a RESTful JSON API - designed to track, manage, engage, and analyze user feedback with ease.
98

109
To know more about [LogChimp APIs](/api).

docs/architecture/readme.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
---
22
title: Architecture
3+
description: How LogChimp works with it's architecture?
34
slug: /docs/architecture
45
---
56

6-
How LogChimp works with it's architecture?
7-
87
LogChimp is an independent, built on a modern technology stack of Node.js for powering its robust JSON API, stand-alone system with dependency only on the database (PostgreSQL) as a data storage layer, with a beautiful and rich client app written in Vue.js including a powerful dashboard - find out more.
98

109
A high-level view of LogChimp's architecture is as shown:
1110

12-
![LogChimp Architecture](/images/docs/logchimp-architecture.png)
11+
![LogChimp Architecture](../../images/docs/architecture/architecture.png)
1312

1413
These five areas work together to make every LogChimp site function smoothly.
1514

16-
1. Robust REST APIs
15+
1. [Robust REST APIs](/docs/architecture/api)
1716
2. Beautiful Vue.js client app
1817
3. Powerful Dashboard
1918
4. PostgreSQL Database
2019
5. Disk storage space
20+
21+
## Node environment
22+
23+
LogChimp supports three environments: `development`, `testing`, `production`. A public LogChimp site should always run in **production** mode, development is used for building LogChimp locally and testing is only used in CI/CD to run tests.

docs/cli/commands.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
---
22
title: Commands
3+
description: Below are the available LogChimp CLI commands. You can always run `logchimp --help` or `logchimp help [COMMAND]` to get more detail.
34
slug: /docs/cli/commands
45
---
56

6-
<!-- components -->
7+
import { Alert } from "../../../src/components/Documentation/Alert.tsx"
78

8-
import Blockquote from "@/components/Blockquote"
9-
10-
Below are the available LogChimp CLI commands. You can always run `logchimp --help` or `logchimp help [COMMAND]` to get more detail.
11-
12-
<Blockquote type="tip">
9+
<Alert type="tip">
1310
Each command is documented in detail on its own page.
14-
</Blockquote>
11+
</Alert>
1512

1613
- [logchimp help](/docs/cli/help)
1714

docs/cli/config/generate.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
title: logchimp config:generate
3+
description: Generate a new configuration for a LogChimp instance.
34
slug: /docs/cli/config/generate
45
---
56

6-
Generate a new configuration for a LogChimp instance.
7-
87
```bash
98
USAGE
109
$ logchimp config:generate [flags]

docs/cli/config/get.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
title: logchimp config:get
3+
description: Get a specific value from the configuration file.
34
slug: /docs/cli/config/get
45
---
56

6-
Get a specific value from the configuration file.
7-
87
```bash
98
USAGE
109
$ logchimp config:get [flags]

docs/cli/config/readme.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
title: logchimp config
3+
description: Generate or modify the LogChimp configuration using `config` command.
34
slug: /docs/cli/config
45
---
56

6-
Generate or modify the LogChimp configuration using `config` command.
7-
87
The `config` commands contains multiple sub-commands.
98

109
```bash

docs/cli/config/set.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
title: logchimp config:set
3+
description: Set a specific value in the configuration file
34
slug: /docs/cli/config/set
45
---
56

6-
Set a specific value in the configuration file
7-
87
```bash
98
USAGE
109
$ logchimp config:set

docs/cli/help.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
title: logchimp help
3+
description: Use the help command to access the list of possible `logchimp` commands when required.
34
slug: /docs/cli/help
45
---
56

6-
Use the help command to access the list of possible `logchimp` commands when required.
7-
87
This command is your port of call when you want to discover a list of available commands in the LogChimp CLI.
98

109
```bash

docs/cli/readme.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
title: CLI
3+
description: An all-in-one tool to help you configure and making it super easy to spin up a new LogChimp site.
34
slug: /docs/cli
45
---
56

6-
An all-in-one tool to help you configure and making it super easy to spin up a new LogChimp site.
7-
87
We understand that some users are going to want more flexibility, so the CLI has a whole set of flags and options that allow you to break the steps down and adjust what they do.
98

109
If you have any suggestions or find bugs 🐞, head over to the [LogChimp CLI GitHub repository](https://github.com/logchimp/logchimp-cli) and let us know.

docs/config.md

+43-18
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
11
---
22
title: Configuration
3+
description: Step by step guide for you to configure LogChimp site using `logchimp.config.json` file.
34
slug: /docs/config
45
---
56

6-
<!-- components -->
7-
import Blockquote from "@/components/Blockquote"
8-
9-
Step by step guide for you to configure LogChimp site using `logchimp.config.json` file.
10-
11-
<Blockquote type="warning">
12-
NOTE: The documentation is very new and may contain some gaps, please help us fill them in by opening issues or better yet, pull-requests when you think something could be explained better.
13-
</Blockquote>
7+
import { Alert } from "../../src/components/Documentation/Alert.tsx"
148

159
## Overview
1610

17-
A custom configuration file must be a valid JSON file located in the root folder. When you install LogChimp using [LogChimp CLI](/docs/cli), a configuration file is created with the options provided. There are some configuration options which are required by default, and few options configuration.
18-
19-
The two required options are `database` and `server` which are configurated during installation process.
11+
There are some configuration options which is pre-filled by default at installation process via [one-click deploy](/docs/install) button, and other options needs to be configured manually, _for example secret credentials_.
2012

21-
In article explains about each configuration and its uses.
13+
There are two ways to configure your LogChimp site:
2214

23-
## Node environment
15+
1. `logchimp.config.json` file
16+
2. Environment variables
2417

25-
LogChimp supports three environments: **development**, **testing**, **production**. A public LogChimp site should always run in production mode, development is used for building LogChimp locally and testing is only used in CI/CD to run tests.
18+
<Alert type="tip">
19+
Configuring your LogChimp site is one time task and is not required for you to update often, unless you're rotating your secret credentials.
20+
</Alert>
2621

27-
## Options
22+
## `logchimp.config.json` file
2823

29-
There are number of options which are explained in detail below.
24+
A custom configuration file must be a valid JSON file located in the root folder.
3025

31-
<Blockquote type="alert">
26+
<Alert type="warning">
3227
The configuration below is just an example and not recommended for production use.
33-
</Blockquote>
28+
</Alert>
29+
30+
The two required options are `database` and `server` which are configurated during installation process.
3431

3532
```json lines
3633
{
@@ -67,6 +64,34 @@ LogChimp uses SMPT connection for sending emails programmatically.
6764
}
6865
```
6966

67+
## Environment variables
68+
69+
**SERVER**
70+
71+
- `LOGCHIMP_SECRET_KEY`: Railway provides an easy way to generate 32-char secret key, by pressing `Command + K` (on MacOS) or `Ctrl + K` (on windows). Of course, you can provide your own secret key as well.
72+
- `PORT`: Please do not change the pre-filled value.
73+
- `LOGCHIMP`: This tells LogChimp to use environment variables instead of [configuration file](/docs/config). Please do not change the pre-filled value.
74+
- `LOGCHIMP_THEME_STANDALONE`: LogChimp allows you to run on single port or split API and theme. If you're using Railway deploy button, you can leave the value to `false`.
75+
76+
**DATABASE**
77+
78+
You can use your own PostgreSQL database or use PostgreSQL plugin provided by Railway. If you're using Railway plugin, you don't have to change the pre-filled values.
79+
80+
- `LOGCHIMP_DB_HOST`: Database host; default to `${{ PGHOST }}`
81+
- `LOGCHIMP_DB_DATABASE`: Database name; default to `${{ PGDATABASE }}`
82+
- `LOGCHIMP_DB_PORT`: Database port; default to `${{ PGPORT }}`
83+
- `LOGCHIMP_DB_USER`: Database user; default to `${{ PGUSER }}`
84+
- `LOGCHIMP_DB_PASSWORD`: Database password; default to `${{ PGPASSWORD }}`
85+
- `LOGCHIMP_DB_SSL`: Database SSL; default to `true`
86+
87+
**MAIL**
88+
89+
You've have to provide SMPT mail authentication details.
90+
91+
- `LOGCHIMP_MAIL_SERVICE`: Name of the email service provider
92+
- `LOGCHIMP_MAIL_HOST`, `LOGCHIMP_MAIL_USER`, and `LOGCHIMP_MAIL_PASSWORD`
93+
- `LOGCHIMP_MAIL_PORT`: SMPT port provided by the service provider; default to `587`
94+
7095
**Does LogChimp support SMPT connection URL?**
7196

7297
No, currently it's not supported. But you're most welcome to [submit a feature request](https://github.com/logchimp/logchimp) anytime.

docs/contributing.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
title: Contributing
3+
description: LogChimp is completely open-source software build almost entirely by volunteer contributors for product owners to build a better version of their product.
34
slug: /docs/contributing
45
---
56

6-
LogChimp is completely open-source software build almost entirely by volunteer contributors for product owners to build a better version of their product.
7-
87
The best part about open-sourcing software this way is that not only does everyone get to access the source code without restriction, but people all over the world help to improve it.
98

109
### Development guide

0 commit comments

Comments
 (0)