Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
SHAPE_DOCS_BASE_URL=http://localhost:3000
SHAPE_DOCS_PROJECT_CONFIGURATION_FILENAME=.shape-docs.yml
NEXT_PUBLIC_SHAPE_DOCS_TITLE=Shape Docs
NEXT_PUBLIC_SHAPE_DOCS_DESCRIPTION=Documentation for Shape's APIs
NEXT_PUBLIC_SHAPE_DOCS_HELP_URL=https://github.com/shapehq/shape-docs/wiki
FRAMNA_DOCS_BASE_URL=http://localhost:3000
FRAMNA_DOCS_PROJECT_CONFIGURATION_FILENAME=.shape-docs.yml
NEXT_PUBLIC_FRAMNA_DOCS_TITLE=Framna Docs
NEXT_PUBLIC_FRAMNA_DOCS_DESCRIPTION=Documentation for Framna's APIs
NEXT_PUBLIC_FRAMNA_DOCS_HELP_URL=https://github.com/shapehq/framna-docs/wiki
NEXTAUTH_URL_INTERNAL=http://localhost:3000
NEXTAUTH_SECRET=use [openssl rand -base64 32] to generate a 32 bytes value
REDIS_URL=localhost
POSTGRESQL_HOST=localhost
POSTGRESQL_USER=dbuser
POSTGRESQL_PASSWORD=
POSTGRESQL_DB=shape-docs
POSTGRESQL_DB=framna-docs
REPOSITORY_NAME_SUFFIX=-openapi
HIDDEN_REPOSITORIES=
NEW_PROJECT_TEMPLATE_REPOSITORY=shapehq/starter-openapi
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ body:
id: expected-behavior
attributes:
label: What is the expected behavior?
description: Please describe the behavior you expect of Shape Docs.
placeholder: I expect that Shape Docs would...
description: Please describe the behavior you expect of Framna Docs.
placeholder: I expect that Framna Docs would...
validations:
required: true
50 changes: 25 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<div align="center">
<img width="200" src="https://github.com/shapehq/shape-docs/raw/main/logo.png" alt="Shape Docs logo" />
<img width="200" src="https://github.com/shapehq/framna-docs/raw/main/logo.png" alt="Framna Docs logo" />
</div>

<div align="center">
<h3>👋 Welcome to Shape Docs</h3>
<h3>👋 Welcome to Framna Docs</h3>
<h4>Self-hosted web portal that collects OpenAPI documentation and facilitates spec-driven development, built with GitHub-based authorization.</h4>
</div>

<div align="center">
<a href="https://github.com/shapehq/shape-docs/actions/workflows/build.yml"><img src="https://github.com/shapehq/shape-docs/actions/workflows/build.yml/badge.svg"></a>
<a href="https://github.com/shapehq/shape-docs/actions/workflows/run-unit-tests.yml"><img src="https://github.com/shapehq/shape-docs/actions/workflows/run-unit-tests.yml/badge.svg"></a>
<a href="https://github.com/shapehq/shape-docs/actions/workflows/test-sql-queries.yml"><img src="https://github.com/shapehq/shape-docs/actions/workflows/test-sql-queries.yml/badge.svg"></a>
<a href="https://github.com/shapehq/shape-docs/actions/workflows/lint.yml"><img src="https://github.com/shapehq/shape-docs/actions/workflows/lint.yml/badge.svg"></a>
<a href="https://github.com/shapehq/shape-docs/actions/workflows/build-docker-image"><img src="https://github.com/shapehq/shape-docs/actions/workflows/build-docker-image.yml/badge.svg"></a>
<a href="https://github.com/shapehq/framna-docs/actions/workflows/build.yml"><img src="https://github.com/shapehq/framna-docs/actions/workflows/build.yml/badge.svg"></a>
<a href="https://github.com/shapehq/framna-docs/actions/workflows/run-unit-tests.yml"><img src="https://github.com/shapehq/framna-docs/actions/workflows/run-unit-tests.yml/badge.svg"></a>
<a href="https://github.com/shapehq/framna-docs/actions/workflows/test-sql-queries.yml"><img src="https://github.com/shapehq/framna-docs/actions/workflows/test-sql-queries.yml/badge.svg"></a>
<a href="https://github.com/shapehq/framna-docs/actions/workflows/lint.yml"><img src="https://github.com/shapehq/framna-docs/actions/workflows/lint.yml/badge.svg"></a>
<a href="https://github.com/shapehq/framna-docs/actions/workflows/build-docker-image"><img src="https://github.com/shapehq/framna-docs/actions/workflows/build-docker-image.yml/badge.svg"></a>
</div>

---
Expand All @@ -21,46 +21,46 @@
<a href="#-getting-started">🚀 Getting Started</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="#-how-does-it-work">👨‍🔧 How does it work?</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="#-how-can-i-contribute">👩‍💻 How can I contribute?</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://github.com/shapehq/shape-docs/wiki">📖 Wiki</a>
<a href="https://github.com/shapehq/framna-docs/wiki">📖 Wiki</a>
</div>

<hr />

Shape Docs makes managing and previewing OpenAPI documentation a breeze, streamlining spec-driven development. With GitHub-based authorization, you can easily control who accesses your docs. Shape Docs comments on pull requests that tweak your OpenAPI specs, giving you preview URLs to ensure every update is well-reviewed.
Framna Docs makes managing and previewing OpenAPI documentation a breeze, streamlining spec-driven development. With GitHub-based authorization, you can easily control who accesses your docs. Framna Docs comments on pull requests that tweak your OpenAPI specs, giving you preview URLs to ensure every update is well-reviewed.

<div align="center">
<img width="600" src="https://github.com/shapehq/shape-docs/raw/main/wiki/home.png?raw=true" alt="Screenshot of Shape Docs"/>
<img width="600" src="https://github.com/shapehq/framna-docs/raw/main/wiki/home.png?raw=true" alt="Screenshot of Framna Docs"/>
</div>

## 🚀 Getting Started

Please refer to the following articles in [the wiki](https://github.com/shapehq/shape-docs/wiki) to get started with Shape Docs.
Please refer to the following articles in [the wiki](https://github.com/shapehq/framna-docs/wiki) to get started with Framna Docs.

- [Adding Documentation to Shape Docs](https://github.com/shapehq/shape-docs/wiki/Adding-Documentation-to-Shape-Docs)
- [Browsing Documentation](https://github.com/shapehq/shape-docs/wiki/Browsing-Documentation)
- [Updating Documentation](https://github.com/shapehq/shape-docs/wiki/Updating-Documentation)
- [Deploying Shape Docs](https://github.com/shapehq/shape-docs/wiki/Deploying-Shape-Docs)
- [Adding Documentation to Framna Docs](https://github.com/shapehq/framna-docs/wiki/Adding-Documentation-to-Framna-Docs)
- [Browsing Documentation](https://github.com/shapehq/framna-docs/wiki/Browsing-Documentation)
- [Updating Documentation](https://github.com/shapehq/framna-docs/wiki/Updating-Documentation)
- [Deploying Framna Docs](https://github.com/shapehq/framna-docs/wiki/Deploying-Framna-Docs)

## 👨‍🔧 How does it work?

Shape Docs uses [OpenAPI specifications](https://swagger.io) from GitHub repositories. Users log in with their GitHub account to access documentation for projects they have access to. A repository only needs an OpenAPI spec to be recognized by Shape Docs, but customization is possible with a .shape-docs.yml file. Here's an example:
Framna Docs uses [OpenAPI specifications](https://swagger.io) from GitHub repositories. Users log in with their GitHub account to access documentation for projects they have access to. A repository only needs an OpenAPI spec to be recognized by Framna Docs, but customization is possible with a .framna-docs.yml file. Here's an example:

<img width="650" src="https://github.com/shapehq/shape-docs/raw/main/wiki/example-openapi-repository-with-config.png?raw=true"/>
<img width="650" src="https://github.com/shapehq/framna-docs/raw/main/wiki/example-openapi-repository-with-config.png?raw=true"/>

Shape Docs supports spec-driven development by requiring OpenAPI specs in GitHub repos, ensuring version control and peer review. When a pull request is opened, Shape Docs comments with links to preview the documentation:
Framna Docs supports spec-driven development by requiring OpenAPI specs in GitHub repos, ensuring version control and peer review. When a pull request is opened, Framna Docs comments with links to preview the documentation:

<img width="760" src="https://github.com/shapehq/shape-docs/raw/main/wiki/pr-comment.png?raw=true"/>
<img width="760" src="https://github.com/shapehq/framna-docs/raw/main/wiki/pr-comment.png?raw=true"/>

Learn more from the [Adding Documentation](https://github.com/shapehq/shape-docs/wiki/Adding-Documentation-to-Shape-Docs), [Browsing Documentation](https://github.com/shapehq/shape-docs/wiki/Browsing-Documentation), and [Updating Documentation](https://github.com/shapehq/shape-docs/wiki/Updating-Documentation) articles in the wiki.
Learn more from the [Adding Documentation](https://github.com/shapehq/framna-docs/wiki/Adding-Documentation-to-Framna-Docs), [Browsing Documentation](https://github.com/shapehq/framna-docs/wiki/Browsing-Documentation), and [Updating Documentation](https://github.com/shapehq/framna-docs/wiki/Updating-Documentation) articles in the wiki.

## 👩‍💻 How can I contribute?

Pull requests with bugfixes and new features are much appreciated. We are happy to review PRs and merge them once they are ready, as long as they contain changes that fit within the vision of Shape Docs.
Pull requests with bugfixes and new features are much appreciated. We are happy to review PRs and merge them once they are ready, as long as they contain changes that fit within the vision of Framna Docs.

Clone the repository and consult the articles on [running Shape Docs locally](https://github.com/shapehq/shape-docs/wiki/Running-Shape-Docs-Locally) and [contributing](https://github.com/shapehq/shape-docs/wiki/Contributing) to get started contributing changes the project.
Clone the repository and consult the articles on [running Framna Docs locally](https://github.com/shapehq/framna-docs/wiki/Running-Framna-Docs-Locally) and [contributing](https://github.com/shapehq/framna-docs/wiki/Contributing) to get started contributing changes the project.

```bash
git clone git@github.com:shapehq/shape-docs.git
git clone git@github.com:shapehq/framna-docs.git
```

## 🔀 Git Workflow
Expand All @@ -82,8 +82,8 @@ Two long-lived branches exist

## ❤️ The Product of a Shape Weekend

Every year we go on Shape Weekend, three days where all employees in Shape get together for a hackathon to build amazing products. In 2023, a team of Shape developers with a passion for documentation and spec-driven development built Shape Docs and we've used it daily ever since!
Every year we go on Shape Weekend, three days where all employees in Shape get together for a hackathon to build amazing products. In 2023, a team of Shape developers with a passion for documentation and spec-driven development built Framna Docs and we've used it daily ever since!

---

Shape Docks is built with ❤️ by [Shape](https://shape.dk) in Denmark. Oh, and [we are hiring](https://careers.shape.dk) 🤗
Framna Docs is built with ❤️ by [Shape](https://shape.dk) in Denmark. Oh, and [we are hiring](https://careers.shape.dk) 🤗
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "shape-docs",
"name": "framna-docs",
"version": "0.1.0",
"private": true,
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(authed)/(home)/(welcome)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Box, Typography } from "@mui/material"
import { grey } from "@mui/material/colors"
import { env } from "@/common"

const SITE_NAME = env.getOrThrow("NEXT_PUBLIC_SHAPE_DOCS_TITLE")
const SITE_NAME = env.getOrThrow("NEXT_PUBLIC_FRAMNA_DOCS_TITLE")

const Page = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/(authed)/(home)/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function Page() {
navigateToSelectionIfNeeded()
}, [project, version, specification, navigateToSelectionIfNeeded])
// Update the window title to match selected project.
const siteName = process.env.NEXT_PUBLIC_SHAPE_DOCS_TITLE || ""
const siteName = process.env.NEXT_PUBLIC_FRAMNA_DOCS_TITLE || ""
useEffect(() => {
updateWindowTitle({
storage: document,
Expand Down
2 changes: 1 addition & 1 deletion src/app/(authed)/(home)/new/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import NewProjectSteps from "@/features/new-project/view/NewProjectSteps"
import { env, splitOwnerAndRepository } from "@/common"
import MessageLinkFooter from "@/common/ui/MessageLinkFooter"

const HELP_URL = env.get("NEXT_PUBLIC_SHAPE_DOCS_HELP_URL")
const HELP_URL = env.get("NEXT_PUBLIC_FRAMNA_DOCS_HELP_URL")

const Page = () => {
const repositoryNameSuffix = env.getOrThrow("REPOSITORY_NAME_SUFFIX")
Expand Down
4 changes: 2 additions & 2 deletions src/app/auth/signin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { faGithub } from "@fortawesome/free-brands-svg-icons"
import SignInTexts from "@/features/auth/view/SignInTexts"
import MessageLinkFooter from "@/common/ui/MessageLinkFooter"

const SITE_NAME = env.getOrThrow("NEXT_PUBLIC_SHAPE_DOCS_TITLE")
const HELP_URL = env.get("NEXT_PUBLIC_SHAPE_DOCS_HELP_URL")
const SITE_NAME = env.getOrThrow("NEXT_PUBLIC_FRAMNA_DOCS_TITLE")
const HELP_URL = env.get("NEXT_PUBLIC_FRAMNA_DOCS_HELP_URL")

export default async function SignInPage() {
return (
Expand Down
4 changes: 2 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { env } from "@/common"
fontAwesomeConfig.autoAddCss = false

export const metadata: Metadata = {
title: env.getOrThrow("NEXT_PUBLIC_SHAPE_DOCS_TITLE"),
description: env.getOrThrow("NEXT_PUBLIC_SHAPE_DOCS_DESCRIPTION")
title: env.getOrThrow("NEXT_PUBLIC_FRAMNA_DOCS_TITLE"),
description: env.getOrThrow("NEXT_PUBLIC_FRAMNA_DOCS_DESCRIPTION")
}

export default function RootLayout({ children }: { children: React.ReactNode }) {
Expand Down
2 changes: 1 addition & 1 deletion src/common/utils/splitOwnerAndRepository.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Split full repository names into owner and repository.
// shapehq/foo becomes { owner: "shapehq", "repository": "foo" }
// acme/foo becomes { owner: "acme", "repository": "foo" }
const splitOwnerAndRepository = (str: string) => {
const index = str.indexOf("/")
if (index === -1) {
Expand Down
8 changes: 4 additions & 4 deletions src/composition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const projectDataSource = new CachingProjectDataSource({
}),
graphQlClient: userGitHubClient,
repositoryNameSuffix: env.getOrThrow("REPOSITORY_NAME_SUFFIX"),
projectConfigurationFilename: env.getOrThrow("SHAPE_DOCS_PROJECT_CONFIGURATION_FILENAME")
projectConfigurationFilename: env.getOrThrow("FRAMNA_DOCS_PROJECT_CONFIGURATION_FILENAME")
})
}),
repositoryNameSuffix: env.getOrThrow("REPOSITORY_NAME_SUFFIX")
Expand All @@ -194,10 +194,10 @@ export const gitHubHookHandler = new GitHubHookHandler({
}),
eventHandler: new PostCommentPullRequestEventHandler({
pullRequestCommenter: new PullRequestCommenter({
siteName: env.getOrThrow("NEXT_PUBLIC_SHAPE_DOCS_TITLE"),
domain: env.getOrThrow("SHAPE_DOCS_BASE_URL"),
siteName: env.getOrThrow("NEXT_PUBLIC_FRAMNA_DOCS_TITLE"),
domain: env.getOrThrow("FRAMNA_DOCS_BASE_URL"),
repositoryNameSuffix: env.getOrThrow("REPOSITORY_NAME_SUFFIX"),
projectConfigurationFilename: env.getOrThrow("SHAPE_DOCS_PROJECT_CONFIGURATION_FILENAME"),
projectConfigurationFilename: env.getOrThrow("FRAMNA_DOCS_PROJECT_CONFIGURATION_FILENAME"),
gitHubAppId: env.getOrThrow("GITHUB_APP_ID"),
gitHubClient: gitHubClient
})
Expand Down
2 changes: 1 addition & 1 deletion src/features/sidebar/view/internal/sidebar/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useRouter } from "next/navigation"
import { useCloseSidebarOnSelection } from "@/features/sidebar/data"

const Header = () => {
const siteName = process.env.NEXT_PUBLIC_SHAPE_DOCS_TITLE
const siteName = process.env.NEXT_PUBLIC_FRAMNA_DOCS_TITLE
const router = useRouter()
const { closeSidebarIfNeeded } = useCloseSidebarOnSelection()
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const SettingsItem = ({ onClick, icon, children }: {
}

const SettingsList = () => {
const helpURL = process.env.NEXT_PUBLIC_SHAPE_DOCS_HELP_URL
const helpURL = process.env.NEXT_PUBLIC_FRAMNA_DOCS_HELP_URL
return (
<List sx={{
padding: 1,
Expand Down