A collaborative platform for artists and writers to work together on creative projects in real-time. Create stories, share artwork, and build amazing creative works together!
- Real-time Collaboration - Work together simultaneously with artists and writers
- Live Drawing Canvas - Interactive drawing tools for creative sketching
- Real-time Chat - Communicate instantly within collaboration rooms
- User Authentication - Secure JWT-based authentication system
- Profile Management - Customize your profile and showcase your work
- Rating & Reviews - Rate and review collaborations
- Genre-based Matching - Find collaborators based on genres and interests
- User Roles - Support for artists, writers, collaborators, and readers
| Layer | Technology |
|---|---|
| Frontend | HTML5, CSS3, JavaScript (ES6+) |
| Backend | Node.js, Express.js |
| Database | MongoDB |
| Real-time | Socket.IO |
| Authentication | JWT (JSON Web Tokens) |
| Security | bcryptjs |
| File Upload | Multer |
- Node.js (>=14.0.0)
- MongoDB (local or cloud instance)
- npm or yarn package manager
- Git
git clone https://github.com/yourusername/pixelscript.git
cd pixelscriptnpm installCopy .env.example to .env and update with your configuration:
cp .env.example .envEdit .env with your values:
PORT=3000
MONGODB_URI=mongodb://localhost:27017/pixelscript
JWT_SECRET=your_secure_jwt_secret_key
JWT_EXPIRES_IN=24h
NODE_ENV=development
SESSION_SECRET=your_session_secret
UPLOAD_PATH=./uploads
MAX_FILE_SIZE=10485760Development mode (with auto-reload):
npm run devProduction mode:
npm startThe server will start at http://localhost:3000
pixelscript/
βββ config/ # Database configuration
βββ middleware/ # Express middleware (auth, error handling)
βββ models/ # MongoDB schemas
β βββ User.js
β βββ Story.js
β βββ Collaboration.js
β βββ Room.js
β βββ Purchase.js
β βββ ...
βββ routes/ # API route handlers
β βββ auth.js
β βββ collab.js
β βββ user.js
β βββ ...
βββ services/ # Business logic
βββ public/ # Frontend assets
β βββ html/ # HTML pages
β βββ css/ # Stylesheets
β βββ js/ # Client-side scripts
β βββ images/ # Images and uploads
βββ uploads/ # File storage
βββ server.js # Main server file
βββ socket.js # Socket.IO configuration
βββ package.json # Dependencies
| Method | Endpoint | Description |
|---|---|---|
| POST | /register |
Register new user |
| POST | /login |
Login user |
| GET | /profile |
Get user profile (protected) |
| PUT | /profile |
Update profile (protected) |
| POST | /logout |
Logout user |
| Method | Endpoint | Description |
|---|---|---|
| POST | / |
Create new collaboration |
| GET | /my-collaborations |
Get user's collaborations (protected) |
| GET | /:id |
Get specific collaboration details |
| PUT | /:id |
Update collaboration (protected) |
| DELETE | /:id |
Delete collaboration (protected) |
| POST | /:id/rate |
Rate collaboration (protected) |
| Method | Endpoint | Description |
|---|---|---|
| POST | / |
Create new story |
| GET | / |
Get all stories |
| GET | /:id |
Get specific story |
| PUT | /:id |
Update story (protected) |
| DELETE | /:id |
Delete story (protected) |
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get all users |
| GET | /:id |
Get user profile |
| GET | /:id/works |
Get user's works |
Connected clients can listen to and emit:
drawing- Live canvas drawing datachat- Real-time chat messagescollaboration-update- Collaboration status changesuser-joined- User joined collaboration roomuser-left- User left collaboration room
The application uses JWT (JSON Web Tokens) for authentication:
- User registers or logs in
- Server returns JWT token
- Client includes token in Authorization header for protected routes
- Server validates token before granting access
Protected routes require this header:
Authorization: Bearer <jwt_token>
curl -X POST http://localhost:3000/api/users/register \
-H "Content-Type: application/json" \
-d '{"username": "artist123", "email": "artist@example.com", "password": "secure_pass"}'curl -X POST http://localhost:3000/api/collab \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"title": "Amazing Story", "description": "Collaborative project"}'We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure:
- Code follows the existing style
- Changes include appropriate documentation
- All features are tested
- Add unit tests
- Implement email verification
- Add payment integration
- Optimize socket.io connections
- Add TypeScript support
This project is licensed under the MIT License - see the LICENSE file for details.
- PixelScript Team - Initial development
- Socket.IO for real-time communication
- MongoDB for flexible data storage
- Express.js community
For support, email support@pixelscript.com or open an issue on GitHub.
Happy Creating! π¨π