Giter VIP home page Giter VIP logo

dwolla / dev-portal Goto Github PK

View Code? Open in Web Editor NEW
6.0 13.0 7.0 12.46 MB

Dwolla developer portal. Provides Guides, Resources, and Tools for developers integrating with the Dwolla Platform

Home Page: https://developers.dwolla.com

License: MIT License

JavaScript 0.42% TypeScript 19.06% HTML 0.02% Dockerfile 0.02% Shell 0.01% MDX 80.47%
developer-portal developer-documentation developer-experience api-documentation

dev-portal's Introduction

dev-portal

Getting Started

If you choose to get started without Docker, ensure that you are building dev-portal with Node v16. Otherwise, to use Docker, refer to the following section, Using Docker.

yarn install
yarn dev
open http://localhost:3000
open dev-portal.code-workspace

Using Docker

Ensure Docker is installed on your machine before following these steps. To use Docker with this repository, you can either use Docker's CLI or Docker Compose, both of which are defined in more detail below:

Docker CLI

# Build Docker Container
$ docker build -t dwolla/dev-portal:0.1.0 .

# Start Docker Container
$ docker run [-d] -p 3000:3000 \
  -v "$(pwd)"/:/app \
  -v /app/.mdx-data \
  -v /app/.next \
  -v /app/node_modules \
  dwolla/dev-portal:0.1.0

Docker Compose

# Build Docker Container
$ docker-compose build

# Start Docker Container
$ docker-compose up [-d]

# Destroy Docker Container
$ docker-compose down

Commands

  • yarn install - Install dependencies
  • yarn dev - Start development server
  • yarn test{,:ci,:coverage} - Run tests
  • yarn checks - Run Prettier, TypeScript, ESLint checks
  • yarn fix - Attempt to fix Prettier, TypeScript, ESLint errors
  • yarn build - Build for production
  • yarn build-storybook - Build Storybook
  • yarn start - Start production server
  • yarn storybook - Start Storybook

Pages

The framework powering dev-portal, Next.js, centers around pages.

In Next.js, a page is a React Component exported from a .js, .ts, or .tsx file in the pages directory. Each page is associated with a route based on its file name.

Example: If you create pages/about.js that exports a React component like below, it will be accessible at /about.

In addition, dev-portal supports .mdx pages which:

  • are Markdown files
  • define metadata as YAML frontmatter
  • can embed React components

For example:

---
category: "" # Which category doc is displayed under in sidebar
title: "" # Doc title when linked to

# Defining a `group` on `index.mdx` groups docs in same folder
group:
  category: "" # Overrides individual doc categories
  title: "" # Group title that can be expanded in sidebar
---

Page content

<MyComponent />

Sections

Categories can be ordered in the side nav by creating a _section.yml file in a section's root directory (e.g. pages/guides/_section.yml).

categories:
  - "Getting Started"
  - "Customers"
  - "Funding Sources"
  - "Webhooks"

doc concepts

Components

In addition to pages, the following can be found in /components:

  • layout components
    • render the layout surrounding a page
  • partial components
    • render parts within a page
  • atom components
    • building blocks extracted from layout and partial components
  • util components
    • don't contain markup or styles

Where to put components?

Components are organized based on their relationship to pages.

As a rule of thumb, start with a layout or partial component. Which one depends on where the component is rendered relative to a page:

  • layout components are rendered outside the page
  • partial components are rendered within the page

component types

What about atom and util components?

atom components can be extracted from layout and partial components when an abstraction becomes apparent. In general, it's a good idea to wait until you have some concrete use cases for an abstraction before creating one.

util components are different than other types of components in that they don't contain markup or styles. util components are good candidates for breaking out into their own library/package at some point.

Conventions

Naming Styled Components

Prefix styled components with Styled*, for example:

const StyledContainer = styled.div`
  padding: 10px;
`;

const MyComponent = () => <StyledContainer>MyComponent</StyledContainer>;

dev-portal's People

Contributors

bingxuren avatar dependabot[bot] avatar finholt avatar jcoon97 avatar joeyhage avatar kellymore avatar natehitze avatar rwinfosec avatar sausman avatar sddaniels avatar shreyathapa avatar spencerhunter avatar tarricsookdeo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dev-portal's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.