Cosmeta: Incarnate is a Flask-based e-novel platform for reading chapters, tracking progress, managing content, and running Discord-based role access for users, supporters, authors, and admins.
Homepage
Admin dashboard for user management
Author dashboard for chapter management
cosmeta/
├── app.py
├── models.py
├── forms.py
├── utils.py
├── update_db.py
├── promote_user.py
├── static/
│ ├── css/
│ ├── images/
│ ├── js/
│ └── uploads/
├── templates/
│ ├── admin/
│ └── *.html
├── requirements.txt
├── vercel.json
├── example.env
└── README.md
Copy example.env to .env and set the values below.
SECRET_KEY=your-secret-key-here
DATABASE_URL=postgresql://username:password@host:port/database?sslmode=require
DISCORD_CLIENT_ID=your-discord-client-id
DISCORD_CLIENT_SECRET=your-discord-client-secret
DISCORD_GUILD_ID=your-discord-guild-id
DISCORD_SUPPORTER_ROLE_ID=your-supporter-role-id
DISCORD_BOT_TOKEN=your-discord-bot-token
SUPABASE_URL=your-supabase-url
SUPABASE_KEY=your-supabase-key
Only DATABASE_URL is required for the database connection used by the app. The other variables are used for Discord authentication, role checks, and optional integrations.
Clone the repository.
git clone https://github.com/KunalGupta25/cosmeta.git
cd cosmeta
Create and activate a virtual environment.
python -m venv venv
source venv/bin/activate
Install dependencies.
pip install -r requirements.txt
Configure your environment.
example.env to .envSECRET_KEY, DATABASE_URL, and the Discord valuesRun the app.
flask --app app run
The app initializes database tables on startup, so a fresh database can be used without a manual migration step.
http://localhost:5000/authorizehttps://your-domain.com/authorizeSECRET_KEY, DATABASE_URL, and the Discord variables you useDATABASE_URL is unavailable or the database tables are missing, the app now initializes tables on boot.//login/dashboard/admin/rss.xmlThis project is licensed under the MIT License. See LICENSE for details.