booking

Booking

MIT License

Stars
1

Booking

Storybook library

Technical Stack

Getting Started

To install MongoDB on macOS:

brew update
brew tap mongodb/brew
brew install [email protected]
brew install mongosh
# start service
brew services start [email protected]
# install mongodb-compass GUI
brew install mongodb-compass

Environment variables

touch .env
echo DB_URI=mongodb://localhost:27017/booking > .env

To start development locally:

yarn dev

To populate the database with data stored locally in the "mocks" folder:

curl --location --request POST 'http://localhost:3000/api/seeding/rooms' --header 'Accept: application/json'

Open http://localhost:3000 with your browser to see the result.

Architecture

src/
├── components
│   ├── Atoms
│   │   ├── Button
│   │   │   ├── Button.stories.tsx
│   │   │   └── Button.tsx
│   │   ├── Checkbox
│   │   └── Icon
│   │       ├── Icon.stories.tsx
│   │       ├── Icon.tsx
│   │       └── svgs
│   ├── Molecules
│   │   ├── Carousel
│   │   │   ├── Carousel.fixture.ts
│   │   │   ├── Carousel.stories.tsx
│   │   │   └── Carousel.tsx
│   │   ├── Loader
│   │   │   ├── Loader.stories.tsx
│   │   │   └── Loader.tsx
│   │   └── SearchField
│   │       ├── SearchField.stories.tsx
│   │       └── SearchField.tsx
│   ├── Organisms
│   │   ├── Card
│   │   │   ├── CardBooking.stories.tsx
│   │   │   ├── CardDefault.stories.tsx
│   │   │   ├── Card.fixtures.tsx
│   │   │   └── Card.tsx
│   │   ├── CardList
│   │   │   ├── CardListBooking.stories.tsx
│   │   │   ├── CardListDefault.stories.tsx
│   │   │   ├── CardList.fixtures.tsx
│   │   │   └── CardList.tsx
│   │   └── Toast
│   │       ├── Toast.fixtures.tsx
│   │       ├── Toast.stories.tsx
│   │       └── Toast.tsx
│   ├── Pages
│   │   └── Home
│   │       ├── Home.stories.tsx
│   │       └── Home.tsx
│   └── Templates
│       ├── Footer
│       │   ├── Footer.stories.tsx
│       │   └── Footer.tsx
│       ├── Header
│       │   ├── Header.stories.tsx
│       │   └── Header.tsx
│       └── Layout
│           ├── Layout.stories.tsx
│           └── Layout.tsx
├── containers
│   ├── helpers
│   │   └── home.mapper.tsx
│   └── Home.container.tsx
├── helpers
│   └── constants.ts
├── mocks
│   ├── fixtures
│   │   └── rooms.ts
│   └── http.ts
├── pages
│   ├── api
│   │   ├── room
│   │   │   └── [id].ts
│   │   ├── rooms
│   │   └── seeding
│   │       └── rooms
│   ├── _app.tsx
│   ├── _document.tsx
│   └── index.tsx
├── server
│   ├── config
│   │   └── env.ts
│   ├── controllers
│   │   └── room.ts
│   ├── factories
│   │   ├── apiError.ts
│   │   └── roomErrors.ts
│   ├── helpers
│   ├── middlewares
│   │   └── errors.ts
│   ├── repository
│   │   ├── db.ts
│   │   └── models
│   │       └── room.ts
│   ├── routes
│   └── services
│       └── room.ts
├── services
│   ├── http.ts
│   └── room.service.ts
├── shared
│   └── schemas
│       ├── errors.ts
│       ├── http.ts
│       └── room.ts
├── store
│   ├── room
│   │   ├── room.slice.ts
│   │   └── room.thunk.ts
│   ├── rootReducer.ts
│   └── store.ts
└── styles
    └── globals.scss
Badges
Extracted from project README
next js typescript redux redux atomic design system Codacy Badge Language grade: JavaScript Total alerts Known Vulnerabilities GitHub Workflows Actions codecov