/
├── backend/ # Backend (FastAPI, PostgreSQL, Cloudinary)
│ ├── main.py # Main FastAPI application
│ ├── models.py # SQLAlchemy models
│ ├── database.py # Database connection
│ └── ...
├── frontend/ # Frontend (HTML/CSS/JS)
│ ├── index.html # Main page
│ ├── styles.css # CSS styles
│ └── ...
├── Dockerfile # For deployment on Railway
├── requirements.txt # Python dependencies
└── README.md # Project documentation
- Backend: Python, FastAPI, SQLAlchemy, PostgreSQL, Cloudinary
- Frontend: HTML, CSS, JavaScript
- Deployment: Docker, Railway
- User registration, authentication (JWT)
- User profile with photo (stored in Cloudinary)
- Event creation, editing, joining/leaving
- Event images (stored in Cloudinary)
- Admin panel for user/content management
- Responsive frontend
- Python 3.8+
- pip
- PostgreSQL (or use Railway cloud DB)
-
Clone the repository:
git clone [your-repo-url] cd [project-directory] -
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables: Create a
.envfile in thebackend/directory with the following:DATABASE_URL=postgresql://user:password@host:port/dbname CLOUDINARY_CLOUD_NAME=your_cloud_name CLOUDINARY_API_KEY=your_api_key CLOUDINARY_API_SECRET=your_api_secret
-
Run the backend:
cd backend uvicorn main:app --reload -
Open the frontend:
- Open
frontend/index.htmlin your browser - Or run a static server:
cd frontend python -m http.server # Visit http://localhost:8000
- Open
- Push your code to GitHub.
- Create a new Railway project and link your GitHub repo.
- Add a PostgreSQL plugin in Railway.
- Set environment variables in Railway:
DATABASE_URL(Railway provides automatically)CLOUDINARY_CLOUD_NAMECLOUDINARY_API_KEYCLOUDINARY_API_SECRET
- Deploy! Railway will build and run your backend automatically.
Tables are created automatically on first run using SQLAlchemy:
Base.metadata.create_all(bind=engine)No manual migration is needed for initial setup.
- All user profile photos and event images are uploaded to Cloudinary.
- Only the public URL is stored in the database.
- No images are stored locally in production.
DATABASE_URL- PostgreSQL connection stringCLOUDINARY_CLOUD_NAME- Cloudinary cloud nameCLOUDINARY_API_KEY- Cloudinary API keyCLOUDINARY_API_SECRET- Cloudinary API secret
For questions or suggestions, please contact [your email].