Skip to content

GWjun/inhagram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inhagram

Next.js Logo      Instagram Logo      NestJS Logo

Project Description

This project is an Instagram clone that implements the main features of Instagram. The frontend is built using Next.js and the backend is built using NestJS. There are no commercial or advertising purposes, and it is for study purposes only.

Demo Example

  1. Login

  2. Follow

  3. User Post

  4. Make Post

  5. Direct Message

Installation and Running

Clone and Install

  1. Clone the repository.

    git clone https://github.com/GWjun/inhagram.git
    cd insta-clone
  2. Install dependencies.

    pnpm install:all
  3. (opontial) You can install frontend and backend dependencies separately.

    cd frontend
    pnpm install
    cd backend
    pnpm install

Environment Variables

  1. Create .env.local files in the frontend directory and configure them as needed.

    NEXT_PUBLIC_SERVER_URL=http://localhost:8080
    NEXT_PUBLIC_SERVER_DOMAIN=localhost
    NEXT_PUBLIC_TOKEN_EXPIRE=your-accessToken-expire-milli-second
    NEXTAUTH_URL=http://localhost:3000
    NEXTAUTH_SECRET=your-secret-key
  2. Create .env.local files in the backend directory and configure them as needed.

    PROTOCOL=http
    HOST=localhost:8080
    PORT=8080
    
    # auth
    JWT_SECRET=your-secret-key
    HASH_ROUNDS=your-hash-round-value
    ACCESS_EXPIRE=your-accessToken-expire-second
    REFRESH_EXPIRE=your-refreshToken-expire-second
    
    # DB
    DB_HOST=localhost
    DB_PORT=5432
    DB_USERNAME=name
    DB_PASSWORD=password
    DB_DATABASE=database
    
    # Google Cloud Storage
    PROJECT_ID=your-id
    PRIVATE_KEY=your-key
    CLIENT_EMAIL=your-email
    STORAGE_BUCKET=your-bucket-name
    DEFAULT_AVATAR_URL=your-default-image

Running the Project

  1. Turn on the Docker app before starting your project to access the database.

  2. To run both the frontend and backend servers simultaneously, go to the root directory and run:

    pnpm start
  3. Accessing the Application

Scripts

  • start: Runs both frontend and backend servers concurrently.
  • start:frontend: Runs the frontend server only.
  • start:backend: Runs the backend server only.

License

This project is licensed under the MIT License.

About

SNS like Instagram

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published