/swipe-app

✨🎥 Step into a world of effortless video creation with Swipe, the cutting-edge app tailored for marketeers and on-the-go content creators.

Primary LanguageTypeScript

SwipeApp

This Nx workspace contains the following applications:

  • Backend application built with Nest.js for server-side functionality.
  • Two front-end applications using Next.js for client-side functionality.

You can check the Nx read me file here: Nx Workspace

Table of Contents

Install app

In the root folder run npm install

npm install

HINT

  • To enhance your development experience, we highly recommend installing the Nx Console extension in Visual Studio Code (VSCode).
  • The Nx Console is a powerful tool that provides a user-friendly interface to navigate and manage your Nx workspace.
  • With the Nx Console, you can efficiently run commands, generate code, analyze dependencies, and access various Nx features.

To install the Nx Console in VSCode, follow these simple steps:

  1. Open Visual Studio Code.
  2. Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac).
  3. In the Extensions view, search for Nx Console using the search bar. Click on the "Install" button next to the Nx Console extension by Nrwl.
  4. Once installed, you can access the Nx Console by clicking on the Nx Console icon in the Activity Bar on the side of the window or press Ctrl+Shift+N (Windows/Linux) or Cmd+Shift+N (Mac).

Commands that can be used

  • api:serve
npx nx run api:serve --configuration=development
  • database:seed
nx run database:seed:run
  • To run web app use command npx nx run web:serve --configuration=development
  • To run remotion studio use command npx nx run web:remotion:studio
  • To create a new Next app use nx g @nx/next:app my-new-app
  • To run remotion studio from libs folder use command npx nx run remotion-composition-studio:remotion:studio

Installing Postgres and pgAdmin

  1. PostgreSQL Installation:

    • Download and install PostgreSQL from the official website: PostgreSQL
    • Follow the installation instructions for your operating system.
    • During the installation, set up a superuser password and remember it for future use.
  2. pgAdmin Installation:

    • Download and install pgAdmin from the official website: pgAdmin
    • Follow the installation instructions for your operating system.
    • Launch pgAdmin after installation and configure it to connect to your PostgreSQL server using the superuser credentials set during the PostgreSQL installation.

Docker Database Setup

  1. Docker Installation:

    • If you prefer to use Docker to run your database, install Docker from the official website: Docker
  2. Running PostgreSQL with Docker:

    • Once Docker is installed, open your terminal or command prompt.

    • Pull the official PostgreSQL image from Docker Hub:

      docker pull postgres
    • Run a PostgreSQL container:

      docker run -d --name postgres-db -e POSTGRES_PASSWORD=<your_password> -p 5432:5432 postgres

      Replace <your_password> with your preferred PostgreSQL password.

  3. Connecting to the Dockerized PostgreSQL:

    • You can now use the same credentials to connect to the PostgreSQL database either with pgAdmin or in your Nx applications.

Running Backend and Frontend Apps

  1. Backend Application:

    • Open a terminal or command prompt and navigate to the apps/backend directory.

    • Install the backend application's dependencies:

      npm install
    • Start the backend application:

      npm run start
    • The backend server will be running on http://localhost:3000.

  2. Frontend Applications:

    • Each front-end application has its own directory within the apps folder.

    • To run each front-end application, open a terminal or command prompt and navigate to the respective front-end app directory (e.g., apps/frontend-app1).

    • Install the front-end application's dependencies:

      npm install
    • Start the front-end application:

      npm run dev
    • The front-end application will be running on http://localhost:4000 for app1 and http://localhost:5000 for app2 (change the port numbers accordingly).

  3. Accessing the Applications:

That's it! You have successfully installed PostgreSQL and pgAdmin, set up a Dockerized database, and run the backend and front-end applications in your Nx workspace. Happy coding! 🚀