- The app consists of a PWA built using React, and a monolithic server built using NestJS
- Data is cached in the browser using LocalForage, and stored server-side using Postgres
- The app state and data are managed using Redux
- GraphQL is used as a data layer
- Code is shared between the server and client using Rushjs
.
├── apps
│ ├── client # Frontend SPA
│ └── server # Server
│
├── libs
├── ctb-to-ahtml # Converts ctb rich-text to a custom format
├── ahtml-to-html # Renders rich-text as html
├── editor # Rich-text editor
│
├── components # Reusable react components
├── icons wrapper # Svg icons wrapper
│
├── default-settings
├── hotkeys
├── graphql-types
│
├── shared-helpers
└── shared-styles
You can use GitHub Codespaces to quickly get started. The environment has all the required development prerequisites. It can be used in the browser or in VS Code.
Start client development:
cd apps/client
rushx dev
Start server development:
cd apps/server
rushx dev
- Node 14
- Rushjs
- Postgres 12
- SMTP server (optional)
Clone the repository:
git clone [email protected]:ycnmhd/cherryjuice.git
cd cherryjuice
Note: the latest changes are in the staging branch.
Set required environment variables in a .env
file placed at the root of the repository:
# .env
DATABASE_URL=postgres://USER:PASSWORD@HOST:5432/DATABASE
Install dependencies and build local libraries:
rush update
rush build
rush types
Start client development:
cd apps/client
rushx dev
Start server development:
cd apps/server
rushx dev
Note: In addition to the development prerequisites, Docker is required.
Clone the repository:
git clone [email protected]:ycnmhd/cherryjuice.git
cd cherryjuice
Build the image:
# you can provide the image name as an argument (default is "cherryjuice")
rush update
rush build --to @cherryjuice/nest-server --to @cherryjuice/react-client
rush deploy
rush prepare-docker-context
rush build-docker
Related: Running the container.