Skip to content

raji383/social-network

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,063 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social Network Project

This is a full-stack social network application with a Go backend and a Next.js frontend. It's set up to be easily run with Docker.

Project Structure

  • backend/: The Go API.
  • frontend/: The Next.js web application.
  • docker-compose.yml: Defines the services for running the application.

Getting Started

To get the application running, you'll need Docker and Docker Compose installed.

  1. Build and run the services:

    docker-compose up --build

    This command will build the Docker images for both the frontend and backend and start the containers.

  2. Access the application:

Development

You can also run the frontend and backend services locally for development.

Backend (Go)

  1. Navigate to the backend directory:
    cd backend
  2. Install dependencies:
    go mod tidy
  3. Run the server:
    go run ./cmd/
    The backend will be running on http://localhost:8080.

Frontend (Next.js)

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Run the development server:

    npm run dev

    The frontend will be running on http://localhost:3000.

    Note: When running the frontend locally, you'll need to create a .env.local file in the frontend directory and set the API URL:

    NEXT_PUBLIC_API_URL=http://localhost:8080
    

Docker Commands

  • Run in detached mode:
    docker-compose up --build -d
  • Stop the services:
    docker-compose down
  • View logs:
    docker-compose logs -f <service_name>  # e.g., backend or frontend

Authors :

@azraji, @abalouri, @abaid, @mennas, @ranniz, @ychatoua 

About

social-netwerk

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 38.2%
  • Go 33.6%
  • CSS 27.8%
  • Other 0.4%