Monorepo for CreativAItor.
apps/api: backend built with express.apps/web: primary web app built with next.js.apps/landing: landing page built with next.js.packages/eslint-config-custom: base ESLint configs.packages/tsconfig: base tsconfig configs.
Follow these instructions to set up the project on your local machine for development and testing purposes.
- Node.js Hydrogen >= 18.17
- pnpm
- Docker / Docker Compose running locally
- MongoDB running locally or a remote MongoDB Atlas cluster
- Upstash Redis account
- Clone the repository:
git clone https://github.com/dave-hay/creativaitor.git
cd creativaitor- Install dependencies:
pnpm install- Createa a copy of the
.env.examplefile in the root folder and update with the neccessary variables.
cp .env- Start the development enviroment:
pnpm run devBelow are the default urls for each app:
- landing: http://localhost:3001
- web: https://localhost:3000
- api: http://localhost:1337
You can test all apps at once or a particular app.
# all
pnpm test
# api
pnpm test:api
# web
pnpm test:web- Install mongosh
brew install mongosh- Pull the docker image
docker pull mongodb/mongodb-community-server:latest- Run the image as a container
docker run --name mongodb -p 27017:27017 -d mongodb/mongodb-community-server:latestThis -p 27017:27017 maps container port to host port. Allowing you to connect to mongodb://127.0.0.1:27017/.
- Connect with mongosh
mongosh --port 27017db.runCommand(
{
hello: 1
}
)Further reading here.