Skip to content

WayakTech/verse

Repository files navigation

Verse

This repository is a monorepo managed with Nx containing projects built with Next.js and NestJS.

Table of Contents

Getting Started

To get started with this monorepo, follow these steps:

  1. Clone the repository:

    git clone https://github.com/System-Garcia/verse.git
    cd verse
  2. Install dependencies:

    npm install
  3. Make sure you have Docker installed and running on your machine for database support.

  4. For each application, copy the .env.template file to .env and fill in the necessary environment variables:

    For the frontend (Next.js) application:

    cp apps/frontend/.env.template apps/frontend/.env

    For the backend (NestJS) application:

    cp apps/backend/.env.template apps/backend/.env
  5. Start the Docker containers for the database:

    npm run start:docker
  6. Run seeder:

    npm run seed

Now you are ready to run the projects.

Project Structure

This repository contains the following projects:

  • apps/frontend: A Next.js application.
  • apps/backend: A NestJS application.

Available Scripts

In the root directory, you can run the following scripts:

  • npm start: Starts the Next.js application in development mode.
  • npm run start:next: Starts the Next.js application in development mode.
  • npm run start:nest: Starts the NestJS application in development mode.
  • npm run build: Builds both the Next.js and NestJS applications.
  • npm run build:next: Builds the Next.js application.
  • npm run build:nest: Builds the NestJS application.
  • npm run start:docker: Starts the Docker containers for the backend.
  • npm run stop:docker: Stops the Docker containers for the backend.
  • npm run test: Runs tests for both the Next.js and NestJS applications.
  • npm run test:next: Runs tests for the Next.js application.
  • npm run test:nest: Runs tests for the NestJS application.
  • npm run lint: Lints both the Next.js and NestJS applications.
  • npm run lint:next: Lints the Next.js application.
  • npm run lint:nest: Lints the NestJS application.

Running the Projects

To run the Next.js application:

npm start

To run the NestJS application:

npm run start:nest

Building the projects

To build both the Next.js and NestJS application:

npm run build

To build Next.js application:

npm run build:next

To build NestJS application:

npm run build:nest

Docker Setup

This monorepo uses Docker for database managment. To start the database:

  1. Make sure Docker is installed and running.
  2. Run the comman: npm run start:docker

To stop docker containers: npm run stop:docker

Testing

To run tests for both the Next.js and NestJS applications:

npm run test

To run tests for the Next.js application:

npm run test:next

To run tests for the NestJS application:

npm run test:nest

Linting

To lint both the Next.js and NestJS applications:

npm run lint

To lint the Next.js application:

npm run lint:next

To lint the NestJS application:

npm run lint:nest

Using Nx

Running tasks

To execute tasks with Nx use the following syntax:

npx nx <target> <project> <...options>

You can also run multiple targets:

npx nx run-many -t <target1> <target2>

..or add -p to filter specific projects

npx nx run-many -t <target1> <target2> -p <proj1> <proj2>

Targets can be defined in the package.json or projects.json. Learn more in the docs.

Set up CI!

Nx comes with local caching already built-in (check your nx.json). On CI you might want to go a step further.

Explore the project graph

Run npx nx graph to show the graph of the workspace. It will show tasks that you can run with Nx.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •