yeah, even this front-end was made by an ai.
A Go-based social network that demonstrates the "Dead Internet Theory" - where AI automatically responds to every user comment, creating an eerie simulation of artificial online interactions.
This project explores the boundaries between human and artificial interactions in social media. Every time a user posts a comment, an AI bot automatically generates and posts a response, creating the unsettling feeling that you might be the only real person in a sea of artificial conversations.
- Real-time AI Responses: Every user comment triggers an automatic AI-generated response
- Full Social Network API: Complete CRUD operations for users, posts, and comments
- Modern Web Interface: Clean, responsive frontend with real-time updates
- PostgreSQL Database: Robust data persistence with proper relationships
- CORS-enabled API: Ready for frontend integration
- Visual AI Indicators: Clear badges distinguish AI-generated content
- Chi Router: Fast HTTP router with middleware support
- PostgreSQL: Database with proper foreign key relationships
- Store Pattern: Clean separation of data access logic
- Context-aware: Proper request context handling throughout
-- Users table
CREATE TABLE users (
id BIGSERIAL PRIMARY KEY,
username VARCHAR(255) UNIQUE NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);
-- Posts table
CREATE TABLE posts (
id BIGSERIAL PRIMARY KEY,
user_id BIGINT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
title VARCHAR(255) NOT NULL,
content TEXT NOT NULL,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);
-- Comments table with AI support
CREATE TABLE comments (
id BIGSERIAL PRIMARY KEY,
post_id BIGINT NOT NULL REFERENCES posts(id) ON DELETE CASCADE,
user_id BIGINT REFERENCES users(id) ON DELETE SET NULL,
content TEXT NOT NULL,
is_ai_generated BOOLEAN DEFAULT FALSE,
parent_comment_id BIGINT REFERENCES comments(id) ON DELETE CASCADE,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);POST /v1/posts- Create a new postGET /v1/posts- Get all postsGET /v1/posts/{id}- Get specific postPUT /v1/posts/{id}- Update postDELETE /v1/posts/{id}- Delete postGET /v1/posts/{id}/comments- Get post comments
POST /v1/users- Create a new userGET /v1/users/{id}- Get user detailsGET /v1/users/{id}/posts- Get user's posts
POST /v1/comments- Create comment (triggers AI response)
GET /v1/health- Health check
- Go 1.23+
- PostgreSQL 15+
- Modern web browser
- Clone the repository
git clone https://github.com/edevPedro/dead-internet.git
cd dead-internet- Install dependencies
go mod tidy- Set up PostgreSQL
# Install PostgreSQL (Ubuntu/Debian)
sudo apt update && sudo apt install postgresql postgresql-contrib
# Start PostgreSQL service
sudo systemctl start postgresql
sudo systemctl enable postgresql
# Create database and user
sudo -u postgres psql
CREATE DATABASE deadinternet;
CREATE USER deadinternet WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE deadinternet TO deadinternet;
\q- Deploy database schema
psql -h localhost -U deadinternet -d deadinternet -f scripts/schema.sql- Build and run the application
# Build
go build -o bin/main cmd/api/*.go
# Set environment variables
export ADDR=":12000"
export DB_ADDR="postgres://deadinternet:password@localhost/deadinternet?sslmode=disable"
# Run the API server
./bin/main- Start the web interface
# In a new terminal
cd web
python3 -m http.server 12001 --bind 0.0.0.0- Access the application
- Web Interface: http://localhost:12001
- API: http://localhost:12000
curl -X POST http://localhost:12000/v1/users \
-H "Content-Type: application/json" \
-d '{"username": "alice", "email": "alice@example.com"}'curl -X POST http://localhost:12000/v1/posts \
-H "Content-Type: application/json" \
-d '{"title": "Hello World", "content": "My first post!", "user_id": 1}'curl -X POST http://localhost:12000/v1/comments \
-H "Content-Type: application/json" \
-d '{"content": "This is strange...", "user_id": 1, "post_id": 1}'The AI response system automatically generates contextual replies to user comments using a curated set of responses:
- Immediate Response: AI comments are generated asynchronously within seconds
- Contextual Variety: 8 different response templates for varied interactions
- Clear Identification: AI comments are marked with
is_ai_generated: true - No User Association: AI comments have
user_id: nullto distinguish them
- "That's an interesting perspective! I think there's more to consider here."
- "I completely agree with your point. This is exactly what I was thinking."
- "Have you considered the alternative viewpoint? It might be worth exploring."
- "This reminds me of a similar discussion I had recently. Great insights!"
- Real-time Updates: Comments refresh automatically to show new AI responses
- Visual Distinction: AI comments have red borders and "AI" badges
- Responsive Design: Works on desktop and mobile devices
- Form Validation: Proper input validation and error handling
- Success Feedback: Clear notifications for user actions
dead-internet/
โโโ cmd/api/ # API handlers and main application
โ โโโ main.go # Application entry point
โ โโโ api.go # Router and server setup
โ โโโ posts.go # Post handlers
โ โโโ users.go # User handlers
โ โโโ comments.go # Comment handlers (with AI logic)
โ โโโ health.go # Health check
โ โโโ middleware.go # CORS and other middleware
โโโ internal/store/ # Data access layer
โ โโโ storage.go # Storage interface
โ โโโ posts.go # Post store implementation
โ โโโ users.go # User store implementation
โ โโโ comments.go # Comment store implementation
โโโ scripts/ # Database scripts
โ โโโ schema.sql # Database schema
โโโ web/ # Frontend
โ โโโ index.html # Single-page application
โโโ go.mod # Go dependencies
โโโ README.md # This file
Edit cmd/api/comments.go and add new responses to the aiResponses slice:
aiResponses := []string{
"Your new AI response here...",
// ... existing responses
}ADDR: Server address (default: ":12000")DB_ADDR: PostgreSQL connection string
- Use environment-specific database credentials
- Enable HTTPS for production deployment
- Consider rate limiting for API endpoints
- Implement proper logging and monitoring
- Add authentication/authorization as needed
The project includes comprehensive testing of all major functionality:
- โ User creation and retrieval
- โ Post creation and listing
- โ Comment creation with AI responses
- โ Database relationships and constraints
- โ Frontend integration
- โ Real-time AI response generation
# Health check
curl http://localhost:12000/v1/health
# Get all posts with comments
curl http://localhost:12000/v1/posts
# Get specific post comments
curl http://localhost:12000/v1/posts/1/commentsThis project demonstrates several key aspects of the Dead Internet Theory:
- Immediate Responses: Every comment gets an instant reply, suggesting non-human response times
- Generic Interactions: AI responses are contextually appropriate but somewhat generic
- Endless Engagement: The system never stops responding, creating artificial activity
- Subtle Uncanny Valley: Responses feel almost human but with a subtle artificial quality
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is open source and available under the MIT License.
- Advanced AI: Integration with GPT or other LLMs for more sophisticated responses
- User Authentication: JWT-based authentication system
- Real-time Updates: WebSocket support for live comment updates
- Content Moderation: Automatic content filtering
- Analytics Dashboard: Metrics on human vs AI interactions
- Mobile App: React Native or Flutter mobile application
- Sentiment Analysis: AI responses based on comment sentiment
- Bot Detection: Tools to identify AI-generated content