import os, textwrap, zipfile, json root = "/mnt/data/ShawonBook" os.makedirs(root, exist_ok=True) pubspec = r''' name: shawonbook description: ShawonBook social media app starter. publish_to: "none" version: 1.0.0+1 environment: sdk: ">=3.3.0 <4.0.0" dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.8 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^3.0.2 flutter: uses-material-design: true ''' main_dart = r''' import 'package:flutter/material.dart'; void main() { runApp(const ShawonBookApp()); } class ShawonBookApp extends StatelessWidget { const ShawonBookApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, title: 'ShawonBook', theme: ThemeData( brightness: Brightness.dark, scaffoldBackgroundColor: const Color(0xFF080B16), colorScheme: ColorScheme.fromSeed( seedColor: const Color(0xFF6C63FF), brightness: Brightness.dark, ), useMaterial3: true, ), home: const LoginPage(), ); } } class LoginPage extends StatefulWidget { const LoginPage({super.key}); @override State createState() => _LoginPageState(); } class _LoginPageState extends State { final email = TextEditingController(); final password = TextEditingController(); @override Widget build(BuildContext context) { return Scaffold( body: SafeArea( child: Padding( padding: const EdgeInsets.all(24), child: Center( child: SingleChildScrollView( child: Column( children: [ Container( width: 86, height: 86, decoration: BoxDecoration( borderRadius: BorderRadius.circular(24), gradient: const LinearGradient( colors: [Color(0xFF7C5CFF), Color(0xFF19C6FF)], ), ), child: const Icon(Icons.people_alt_rounded, size: 48), ), const SizedBox(height: 18), const Text('ShawonBook', style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold)), const SizedBox(height: 8), const Text('Connect • Share • Create', style: TextStyle(color: Colors.white60)), const SizedBox(height: 36), TextField( controller: email, decoration: const InputDecoration( labelText: 'Email / Phone', prefixIcon: Icon(Icons.person_outline), border: OutlineInputBorder(), ), ), const SizedBox(height: 14), TextField( controller: password, obscureText: true, decoration: const InputDecoration( labelText: 'Password', prefixIcon: Icon(Icons.lock_outline), border: OutlineInputBorder(), ), ), const SizedBox(height: 20), SizedBox( width: double.infinity, height: 52, child: FilledButton( onPressed: () => Navigator.pushReplacement( context, MaterialPageRoute(builder: (_) => const HomePage())), child: const Text('LOGIN'), ), ), TextButton( onPressed: () {}, child: const Text('Create new account'), ), ], ), ), ), ), ), ); } } class HomePage extends StatefulWidget { const HomePage({super.key}); @override State createState() => _HomePageState(); } class _HomePageState extends State { int index = 0; final posts = const [ ['Admin', 'Welcome to ShawonBook! 🎉', Icons.admin_panel_settings], ['Creator', 'New video is coming soon 🎥', Icons.video_library], ['ShawonBook', 'Share your photos and moments with friends.', Icons.photo], ]; @override Widget build(BuildContext context) { final pages = [ _feed(), const Center(child: Text('Messages', style: TextStyle(fontSize: 24))), const Center(child: Text('Notifications', style: TextStyle(fontSize: 24))), const ProfilePage(), ]; return Scaffold( appBar: AppBar( title: const Text('ShawonBook', style: TextStyle(fontWeight: FontWeight.bold)), actions: [ IconButton(onPressed: () {}, icon: const Icon(Icons.search)), IconButton(onPressed: () {}, icon: const Icon(Icons.settings_outlined)), ], ), body: pages[index], floatingActionButton: index == 0 ? FloatingActionButton.extended( onPressed: () => _showCreatePost(), icon: const Icon(Icons.add), label: const Text('Post'), ) : null, bottomNavigationBar: NavigationBar( selectedIndex: index, onDestinationSelected: (i) => setState(() => index = i), destinations: const [ NavigationDestination(icon: Icon(Icons.home_outlined), selectedIcon: Icon(Icons.home), label: 'Home'), NavigationDestination(icon: Icon(Icons.chat_bubble_outline), selectedIcon: Icon(Icons.chat_bubble), label: 'Chat'), NavigationDestination(icon: Icon(Icons.notifications_none), selectedIcon: Icon(Icons.notifications), label: 'Alerts'), NavigationDestination(icon: Icon(Icons.person_outline), selectedIcon: Icon(Icons.person), label: 'Profile'), ], ), ); } Widget _feed() { return ListView( padding: const EdgeInsets.fromLTRB(12, 12, 12, 90), children: [ _composer(), const SizedBox(height: 12), ...posts.map((p) => _post(p[0] as String, p[1] as String, p[2] as IconData)), ], ); } Widget _composer() { return Card( child: Padding( padding: const EdgeInsets.all(12), child: Row( children: [ const CircleAvatar(child: Text('S')), const SizedBox(width: 10), Expanded( child: OutlinedButton( onPressed: _showCreatePost, child: const Align( alignment: Alignment.centerLeft, child: Text('What do you want to share?'), ), ), ), ], ), ), ); } Widget _post(String name, String text, IconData icon) { return Card( margin: const EdgeInsets.only(bottom: 12), child: Padding( padding: const EdgeInsets.all(14), child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ Row(children: [ CircleAvatar(child: Icon(icon, size: 20)), const SizedBox(width: 10), Expanded(child: Text(name, style: const TextStyle(fontWeight: FontWeight.bold))), const Icon(Icons.more_horiz), ]), const SizedBox(height: 14), Text(text, style: const TextStyle(fontSize: 16)), const SizedBox(height: 16), Container( height: 190, width: double.infinity, decoration: BoxDecoration( borderRadius: BorderRadius.circular(16), gradient: const LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [Color(0xFF171D35), Color(0xFF27205A)], ), ), child: const Center(child: Icon(Icons.play_circle_fill, size: 64)), ), const SizedBox(height: 8), Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ TextButton.icon(onPressed: () {}, icon: const Icon(Icons.favorite_border), label: const Text('Like')), TextButton.icon(onPressed: () {}, icon: const Icon(Icons.comment_outlined), label: const Text('Comment')), TextButton.icon(onPressed: () {}, icon: const Icon(Icons.share_outlined), label: const Text('Share')), ]), ]), ), ); } void _showCreatePost() { showModalBottomSheet( context: context, isScrollControlled: true, builder: (_) => Padding( padding: EdgeInsets.only( left: 20, right: 20, top: 20, bottom: MediaQuery.of(context).viewInsets.bottom + 20, ), child: Column(mainAxisSize: MainAxisSize.min, children: [ const Text('Create Post', style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold)), const SizedBox(height: 14), const TextField(maxLines: 4, decoration: InputDecoration( hintText: 'Write something...', border: OutlineInputBorder(), )), const SizedBox(height: 12), Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ OutlinedButton.icon(onPressed: () {}, icon: const Icon(Icons.photo), label: const Text('Photo')), OutlinedButton.icon(onPressed: () {}, icon: const Icon(Icons.video_library), label: const Text('Video')), ]), const SizedBox(height: 10), SizedBox(width: double.infinity, child: FilledButton( onPressed: () => Navigator.pop(context), child: const Text('POST'), )), ]), ), ); } } class ProfilePage extends StatelessWidget { const ProfilePage({super.key}); @override Widget build(BuildContext context) { return ListView( padding: const EdgeInsets.all(20), children: [ const CircleAvatar(radius: 54, child: Icon(Icons.person, size: 55)), const SizedBox(height: 12), const Center(child: Text('ShawonBook Admin', style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold))), const SizedBox(height: 4), const Center(child: Text('Admin • Creator', style: TextStyle(color: Colors.white60))), const SizedBox(height: 24), Card(child: Column(children: [ ListTile(leading: const Icon(Icons.account_balance_wallet_outlined), title: const Text('Wallet / Earnings'), trailing: const Text('৳ 0')), const Divider(height: 1), ListTile(leading: const Icon(Icons.phone_in_talk_outlined), title: const Text('Audio & Video Calls'), onTap: () {}), ListTile(leading: const Icon(Icons.admin_panel_settings_outlined), title: const Text('Admin Panel'), onTap: () {}), ])), ], ); } } ''' readme = r''' # ShawonBook This is a starter Flutter project matching the approved ShawonBook dark social-media UI concept. Included in this first build: - Login screen - Home feed - Post composer - Like / Comment / Share UI - Profile - Wallet/Earnings placeholder - Chat/Notifications navigation - Admin Panel entry point - Responsive Material 3 styling Next production integrations: - Firebase Authentication - Firestore/Realtime Database - Cloud Storage for photos/videos - Real-time chat - Audio/video calling - Creator monetization - bKash/Nagad compliant payout integration - Admin web dashboard - Push notifications - App update/release pipeline To run: 1. Install Flutter. 2. Run `flutter pub get` 3. Run `flutter run` ''' open(os.path.join(root, "pubspec.yaml"), "w").write(pubspec.strip()+"\n") os.makedirs(os.path.join(root, "lib"), exist_ok=True) open(os.path.join(root, "lib", "main.dart"), "w").write(main_dart.strip()+"\n") open(os.path.join(root, "README.md"), "w").write(readme.strip()+"\n") zip_path = "/mnt/data/ShawonBook_Starter.zip" with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED) as z: for base, _, files in os.walk(root): for f in files: path = os.path.join(base, f) z.write(path, os.path.relpath(path, "/mnt/data")) print(f"Created: {zip_path}")
Hosted & Compiled with HtmlRunner.com