Skip to content

GKestenberg/front-back-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Full-Stack Messaging App

Change 1

A real-time messaging application built with Go (backend) and Next.js (frontend).

⚠️ Development & Testing Project
This is an experimental project created for development testing and deployment experimentation purposes. It is not intended for production use and may contain security vulnerabilities, incomplete features, or unstable code. Use at your own risk.

Project Structure

front-back-stack/
├── backend/           # Go API server
│   ├── handlers/      # HTTP request handlers
│   ├── models/        # Data models
│   ├── utils/         # Utility functions (JWT)
│   ├── main.go        # Main server file
│   └── go.mod         # Go dependencies
└── frontend/          # Next.js React app
    ├── components/    # React components
    ├── pages/         # Next.js pages
    ├── utils/         # API and auth utilities
    ├── styles/        # CSS styles
    └── package.json   # Node dependencies

Features

  • User registration and authentication
  • JWT-based session management
  • Real-time message display
  • Profile picture support
  • In-memory message storage
  • Responsive UI design

Running the Application

Backend (Go)

  1. Navigate to the backend directory:

    cd backend
  2. Install dependencies:

    go mod tidy
  3. Run the server:

    go run main.go

The backend will start 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 start on http://localhost:3000

API Endpoints

Authentication

  • POST /api/register - Register a new user
  • POST /api/login - Login user

Messages (Protected)

  • GET /api/messages - Get all messages
  • POST /api/messages - Send a new message

Usage

  1. Start both backend and frontend servers
  2. Open http://localhost:3000 in your browser
  3. Register a new account or login
  4. Start messaging!

Technologies Used

Backend:

  • Go 1.21
  • Gorilla Mux (routing)
  • JWT authentication
  • bcrypt (password hashing)
  • CORS support

Frontend:

  • Next.js 14
  • React 18
  • TypeScript
  • Axios (HTTP client)
  • Local storage for auth persistence

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •