PostStream is an undesigned social network. It is a text-based response to the majority of modern social media platforms. This is certainly not for everyone as you will be interacting with others exclusively through text posts. You will notice several features intentionally left out in order to promote meaningful engagement. We hope you enjoy something a little different.
Tentative example post:
[real name] [username] [time stamp]
[post]
Bill Atkinson billatkinson 2016.07.24 10:27:29
I invented the double-click.
- Node.js (>=18.0.0)
- PostgreSQL
Download and unpack PostStream. Or alternatively checkout from source:
git clone git@github.com:JoeKarlsson/post-stream.git
cd post-stream
-
Start the application:
docker-compose up --build -
Access the application:
- Open http://localhost:3002 in your browser
The Docker setup automatically handles:
- PostgreSQL database setup
- Database migrations
- Database seeding
- All dependencies
-
Install dependencies:
npm install
-
Setup PostgreSQL:
- Create a new database called
poststream_development - Update
server/config/config.jsonwith your database credentials:
{ "development": { "username": "your_username", "password": "your_password", "database": "poststream_development", "host": "127.0.0.1", "dialect": "postgres", "port": 5432 } }
- Create a new database called
-
Run database migrations and seeders:
npm run db:migrate npm run db:seed
-
Setup Auth0 credentials:
- Create an account at Auth0
- Create a new application in your Auth0 dashboard
- Create a
.envfile with your Auth0 credentials:
AUTH0_CLIENT_ID=your_client_id AUTH0_CLIENT_SECRET=your_client_secret AUTH0_DOMAIN=your_domain.auth0.com AUTH0_CALLBACK_URL=http://localhost:3000/ AUTH0_TOKEN=your_token
-
Build the application (first time only):
npm run build
-
Start the development server:
npm run dev
This will start:
- Vite dev server on http://localhost:3000 (frontend)
- Express API server on http://localhost:3001 (backend)
-
Access the application:
- Navigate to http://localhost:3000 in your browser
PostStream now uses modern build tools for improved performance:
- Vite: Lightning-fast build tool with instant HMR (Hot Module Replacement)
- React 18.3: Latest React with modern features
- Redux 5: State management with improved TypeScript support
- React Router DOM 6: Modern routing solution
- SCSS Modules: Scoped styling with CSS modules
- ESLint 8: Modern linting with React hooks support
npm run dev- Start development (both Vite and Express concurrently)npm run dev:client- Start Vite dev server onlynpm run dev:server- Start Express server onlynpm run build- Build for productionnpm run preview- Preview production buildnpm test- Run server testsnpm run db:migrate- Run database migrationsnpm run db:seed- Seed database with sample datanpm run db:seed:undo- Remove all seeded datanpm run db:reset- Reset database by undoing and re-running seeders
In order to get an update from this repo, open your directory and type this command:
git pull
If you're using Docker, rebuild the containers after pulling updates:
docker-compose down
docker-compose up --build
For major updates, you may need to:
rm -rf node_modules package-lock.json
npm install
npm run build
- No public metrics
- No visible follower/following numbers
- No visible like/dislike numbers
- No global public feed
- No "moments" or news-related feeds
- No trending topics to browse
- Character limit
- Brevity
- Accessibilty
- Stream shows 256 characters with "read more" expandable to 2048 character limit
- No video/images/gifs
- Unicode support 🆗
- Contextual responses
- agree
- agree for $reason
- disagree
- disagree for $reason
- tell me more about $thought / $opinion
- thank you for sharing
- brilliant
- No ads or sponsored posts
- Possible fuzzy metrics (Your engagement is {very high} {high} {average})
- SMS-support
- Filtering of topics
- Mute options for keywords
- Signup categories - subscribe to posts from only certain categories
- Autofilter based on keywords, hashtags
- Keybase Verification
- Highlight text [medium.com]
- Permalinks - jump to comment or highlight
- Customize appearance
- Theme support (Github, Solarized, Tomorrow, etc.)
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
This project includes Docker support for easier development and deployment. The Docker setup includes:
- PostgreSQL Database: Pre-configured with the correct schema
- Automatic Setup: Database migrations and seeders run on startup
- Hot Reloading: Code changes are reflected immediately
- Isolated Environment: No need to install dependencies locally
- Start services:
docker-compose up - Start in background:
docker-compose up -d - Stop services:
docker-compose down - Rebuild and start:
docker-compose up --build - View logs:
docker-compose logs -f app - Reset database:
docker-compose down -v && docker-compose up --build
The application runs on port 3002 (mapped from container port 3000) to avoid conflicts with other services. The database runs on the standard PostgreSQL port 5432.
For detailed Docker setup instructions, see DOCKER_README.md.
PostStream uses PostgreSQL with Sequelize ORM for database management. The application includes comprehensive seeders that populate the database with realistic test data.
npm run db:migrate- Run database migrations to set up the schemanpm run db:seed- Populate database with sample users, posts, and commentsnpm run db:seed:undo- Remove all seeded data (keeps schema intact)npm run db:reset- Reset database by undoing and re-running all seeders
The seeders create:
-
3 Users with complete profiles and authentication:
johndoe131- Software developer and tech enthusiastjanedoe343- Designer and creative thinkerjoejoebinks131- Full-stack developer and coffee lover
-
9 Posts with realistic content covering various topics
-
10 Comments with proper relationships and conversation flow
All user passwords are set to password123 for testing purposes.
- Users: Authentication, profile information, and user preferences
- Posts: User-generated content with comment counts and timestamps
- Comments: Threaded comments with parent-child relationships
- Foreign Keys: Proper relationships between all entities
- Ray Farias
- Jacoby Young
- Joe Karlsson
Request:
GET /post
Response:
[
{
"id": 1,
"body": "JohnDoe131 post 1",
"createdAt": "2016-07-28T01:37:36.809Z",
"updatedAt": "2016-07-28T01:37:36.809Z",
"UserId": 1
},
{
"id": 2,
"body": "JohnDoe131 post 2",
"createdAt": "2016-07-28T01:37:36.809Z",
"updatedAt": "2016-07-28T01:37:36.809Z",
"UserId": 1
}
]
Request:
GET /post/:id
Response:
{
"id": 1,
"body": "JohnDoe131 post 1",
"createdAt": "2016-07-28T01:37:36.809Z",
"updatedAt": "2016-07-28T01:37:36.809Z",
"UserId": 1
}
Request:
POST /post/new
Content-Type: application/json
{
"body": "Your post content here"
}
Response:
{
"id": 1,
"body": "Your post content here",
"createdAt": "2016-07-28T01:37:36.809Z",
"updatedAt": "2016-07-28T01:37:36.809Z",
"UserId": 1
}
Request:
PUT /post/:id/edit
Content-Type: application/json
{
"body": "Updated post content"
}
Response:
{
"id": 1,
"body": "Updated post content",
"createdAt": "2016-07-28T01:37:36.809Z",
"updatedAt": "2016-07-28T01:37:36.809Z",
"UserId": 1
}
Request:
DELETE /post/:id
Response:
{
"success": true
}
Request:
GET /post/:id/comments
Response:
[
{
"id": 2,
"body": "JohnDoe131 comment 1 post 2",
"createdAt": "2016-07-28T01:37:36.809Z",
"updatedAt": "2016-07-28T01:37:36.809Z",
"UserId": 1,
"PostId": 2
},
{
"id": 5,
"body": "JaneDoe343 comment 2 post 2",
"createdAt": "2016-07-28T01:37:36.809Z",
"updatedAt": "2016-07-28T01:37:36.809Z",
"UserId": 2,
"PostId": 2
}
]
Request:
POST /:PostId/comments/:CommentId/newPost
Content-Type: application/json
{
"body": "Your comment content here"
}
Response:
{
"id": 1,
"body": "Your comment content here",
"createdAt": "2016-07-28T01:37:36.809Z",
"updatedAt": "2016-07-28T01:37:36.809Z",
"UserId": 1
}
Request:
PUT /:PostId/comments/:CommentId/edit
Content-Type: application/json
{
"body": "Updated comment content"
}
Response:
{
"id": 1,
"body": "Updated comment content",
"createdAt": "2016-07-28T01:37:36.809Z",
"updatedAt": "2016-07-28T01:37:36.809Z",
"UserId": 1
}