Update README.md, add license and update Dockerfile

This commit is contained in:
Tobias Hopp 2025-04-15 16:19:19 +02:00
parent 40e92133bc
commit e1aff7af2c
4 changed files with 155 additions and 2 deletions

16
LICENSE.txt Normal file
View File

@ -0,0 +1,16 @@
Copyright (c) 2025 Tobias Hopp and Philip Rothstein
All rights reserved.
Permission is hereby granted to use the software as is for personal and internal organizational purposes only. Any modification, redistribution (whether modified or unmodified), or commercial exploitation of the software, including incorporation into other products or services, is strictly prohibited unless a written permission has been obtained from the copyright owner.
Restrictions:
Modification: You may not modify, alter, or create derivative works of the software without prior written consent.
Redistribution: You may not redistribute or sublicense any version of the software without obtaining explicit permission.
Commercial Use: Any form of commercial exploitation, including selling or licensing the software or its derivatives, is not allowed without a separate licensing agreement.
Disclaimer:
This software is provided "as is", without warranty of any kind, express or implied. In no event shall the copyright owner be liable for any claim, damages, or other liability.

137
README.md
View File

@ -0,0 +1,137 @@
# Relnet: Friendship Connection Visualizer
A dynamic web application for visualizing and managing a friendship network. This project uses React Flow to display interactive connection graphs between friends, and includes a backend server built with Node.js, TypeScript, Express, and Mongoose for data persistence.
## Overview
The Friendship Connection Visualizer lets you easily map out your social network. You can add people with their first and last names (with an optional birthday), establish relationships between them, and interact with the network through a draggable graph interface. When a node (representing a person) is clicked, a popup appears displaying a detailed list of all relationships for that individual.
## Features
- **User Management**
- **Add Person:** Use the sidebar form to add individuals by entering first and last names. An optional field for birthday is also available.
- **Display Format:** On the graph, each person is represented by their first name and the first character of their last name.
- **Deletion:** Remove people easily from your network with a dedicated delete button.
- **Relationship Management**
- **Create Relationships:** Build connections by selecting a person from the dropdown and then choosing one or more individuals from a multi-select box for establishing relationships.
- **Relationship Types:** Visualize different kinds of relationships with unique colors:
- Blue for friends
- Green for family
- Yellow for colleagues
- Gray for acquaintances
- **Interactive Visualization**
- **Dynamic Graph:** Use React Flow to view an interactive network graph where nodes are draggable, allowing you to reorganize the display.
- **Popups:** When clicking on a person in the graph, a popup appears with a detailed list of all their connections and relationship details.
## Tech Stack
- **Backend:**
- **Node.js & TypeScript:** Server-side development with strong typing.
- **Express:** Web framework for handling routes and middleware.
- **Mongoose:** ODM for MongoDB, providing schema-based data management.
- **Frontend:**
- **React:** User interface library to create interactive components.
- **Vite:** Fast development environment and build tool.
- **React Flow:** Library for creating interactive node-based diagrams.
## Project Structure
```plaintext
frontend/
├── src/
│ ├── api/
│ ├── components/
│ ├── context/
│ ├── hooks/
│ ├── App.tsx
│ ├── main.tsx
│ ├── index.html
backend/
├── src/
│ ├── config/ # Configuration files
│ ├── controllers/ # API controllers
│ ├── middleware/ # Authentication middleware
│ ├── models/ # MongoDB models
│ ├── routes/ # API routes
│ ├── types/ # TypeScript interfaces
│ ├── app.ts # Express app setup
│ └── server.ts # Entry point
├── .env # Environment variables
├── .gitignore # Git ignore file
├── package.json # Dependencies
└── tsconfig.json # TypeScript configuration
```
## Installation
### Prerequisites
- **Node.js** (v22 recommended)
- **npm** or **yarn**
- **MongoDB** for the database
### Backend Setup
1. Clone repo
2. Install dependencies:
```bash
yarn install
```
3. Create a `.env` file to store configuration variables (e.g., MongoDB URI, PORT, etc.).
4. Start the server in development mode:
```bash
npm run dev
```
### Frontend Setup
1. Navigate to the frontend folder:
```bash
cd frontend
```
2. Install dependencies:
```bash
yarn install
```
3. Start the development server:
```bash
npm run dev
```
## Usage
1. **Adding People:**
- Use the sidebar to enter the first name, last name, and optionally, a birthday.
- Click the **Add** button to add the person to your network.
2. **Creating Relationships:**
- In the relationship menu, select the first person.
- Use the multi-select dropdown to choose one or more people for the relationship.
- Choose the relationship type (friends, family, colleagues, or acquaintances) and create the connection.
3. **Interacting with the Graph:**
- Drag nodes around the visualization area to reorganize your network.
- Click a node to open a popup displaying the persons detailed relationship list.
4. **Deleting People:**
- Click the delete button on a node or in the popup to remove a person from the network.
## Future Enhancements
- **Enhanced User Profiles:** Additional fields and profile pictures.
- **Search and Filter:** Advanced search capabilities to quickly find people or relationships.
- **Real-time Updates:** Incorporate WebSockets for live network updates.
- **Mobile Responsiveness:** Optimizations for mobile devices.
## Contributing
Contributions are welcome! If you have any ideas, bug reports, or feature requests, please open an issue or submit a pull request.
Ensure that all code and comments in the source code remain in English to maintain consistency.
## License
This project is licensed under the Custom Proprietary License see the [LICENSE.txt](LICENSE.txt) file for details.

View File

@ -6,7 +6,7 @@ networks:
services:
relnet:
image: github.com/philipredstone/relnet:latest
image: ghcr.io/philipredstone/relnet:latest
build: .
networks:
- internal

View File

@ -4,7 +4,7 @@ networks:
services:
relnet:
image: github.com/philipredstone/relnet:latest
image: ghcr.io/philipredstone/relnet:latest
build: .
ports:
- "80:80"