Skip to content

browseping/server

BrowsePing Server

This repository contains the backend server implementation for BrowsePing, an open-source real-time social presence platform that transforms web browsing into a shared social experience. The server handles user authentication, real-time WebSocket connections, friend management, messaging, analytics tracking, and leaderboard functionality.

Prerequisites

Installation for Development

1. Clone the Repository

git clone https://github.com/browseping/server.git
cd server

2. Install Dependencies

npm install

3. Setup MySQL and Redis

Using Docker (Recommended)

Start MySQL:

docker run --name browseping-mysql -e MYSQL_ROOT_PASSWORD=yourpassword -e MYSQL_DATABASE=browseping -p 3306:3306 -d mysql:8

Start Redis:

docker run --name browseping-redis -p 6379:6379 -d redis

Using Local Installation

Make sure MySQL and Redis services are running on your system:

# Check MySQL status
mysql --version
sudo systemctl status mysql  # Linux
brew services list | grep mysql  # macOS

# Check Redis status
redis-cli ping  # Should return PONG
sudo systemctl status redis  # Linux
brew services list | grep redis  # macOS

4. Configure Environment Variables

Copy the example environment file:

cp .env.example .env

Edit the .env file with your configuration.

5. Setup Database

Generate Prisma Client:

npm run prisma:generate

Run database migrations:

npm run prisma:migrate

6. Start the Development Server

npm run dev

The server will start on http://localhost:3000 (or the port specified in your .env file).

Available Scripts

  • npm run dev - Start development server with hot reload (using nodemon)
  • npm run build - Compile TypeScript to JavaScript
  • npm start - Run production server (requires build first)
  • npm run prisma:generate - Generate Prisma Client
  • npm run prisma:migrate - Run database migrations

Development Workflow

  1. Start the development server:

    npm run dev
  2. Make changes to the code in the src/ directory

  3. Test your changes using API clients like Postman or Thunder Client

  4. Create database migrations when changing the schema:

    npx prisma migrate dev --name your_migration_name
  5. Follow our Contributing Guidelines when submitting changes

Docker (Recommended for Local Development)

This project supports local development using Docker and Docker Compose.

Setup

Copy the environment file:

cp .env.example .env

Edit .env and set your credentials (except DATABASE_URL and REDIS_URL — those are hardcoded in docker-compose.yml).

Start the application:

docker compose up --build

The server will be available at:

http://localhost:3000

Contributing

We welcome contributions to the BrowsePing server! Whether it's fixing bugs, improving documentation, or adding new features, your help is appreciated.

Please read our Contributing Guidelines for details on how to get started.

Join our community on Discord to discuss ideas and collaborate with other contributors.

Community & Links

Connect With Us

Related Repositories

Support

License

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

Contributors

Thanks to all the wonderful people who have contributed to this project.

About

BrowsePing backend API server. Handles authentication, social features, and real-time communication.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •