StoryMate is a comprehensive web application that leverages artificial intelligence to help users create, manage, and share stories. Built with ASP.NET Core 3.1 and integrated with Google's Gemini API, it provides an intuitive platform for both manual story creation and AI-powered story generation.
- π€ AI-Powered Story Generation - Create stories using Google's Gemini 2.5 Pro model
- π Personal Story Library - Manage and organize your stories in a personal collection
- π Multiple Genres - Support for Fantasy, Sci-Fi, Mystery, Horror, Romance, and more
- π Secure Authentication - User registration and login with ASP.NET Core Identity
- π₯ Admin Dashboard - Comprehensive platform management and user oversight
- π± Responsive Design - Modern, mobile-friendly interface built with Bootstrap 4
- βοΈ Dual Creation Modes - Manual story creation or AI-assisted generation
- π¨ Custom Covers - Add cover images to your stories
- π Privacy Controls - Public/private story visibility settings
- Backend: ASP.NET Core 3.1 MVC
- Database: SQLite with Entity Framework Core
- Authentication: ASP.NET Core Identity
- AI Service: Google Gemini API (Gemini 2.5 Pro)
- Frontend: Bootstrap 4, jQuery, Font Awesome
- UI Framework: Razor Pages with MVC pattern
StoryMate/
βββ StoryMate/ # Main application
β βββ Controllers/ # MVC Controllers
β βββ Data/ # Database context and models
β βββ Models/ # Domain models
β βββ Services/ # Business logic services
β βββ Views/ # Razor views
β βββ wwwroot/ # Static files
βββ StoryMate.Admin/ # Admin application
β βββ Controllers/ # Admin controllers
β βββ Models/ # Admin view models
β βββ Views/ # Admin views
βββ StoryMate.Shared/ # Shared library
- .NET Core 3.1 SDK
- Visual Studio 2019/2022 or Visual Studio Code
- Google Gemini API Key (for AI features)
-
Clone the repository
git clone https://github.com/NotYash1066/StoryMate.git cd StoryMate -
Restore dependencies
dotnet restore
-
Configure the database
cd StoryMate dotnet ef database update -
Set up your Gemini API key
Option A: User Secrets (Recommended for development)
cd StoryMate dotnet user-secrets set "GeminiApiKey" "your-actual-gemini-api-key-here"
Option B: appsettings.json
{ "GeminiApiKey": "your-actual-gemini-api-key-here" } -
Run the application
dotnet run
-
Access the application
- Main Application:
https://localhost:5001 - Admin Application:
https://localhost:5002(if running separately)
- Main Application:
The application uses SQLite for data storage. The database will be automatically created on first run with the following seeded data:
- 9 Predefined Genres: Fantasy, Sci-Fi, Mystery, Horror, Romance, Adventure, Drama, Thriller, Comedy
- Sample Data: No sample stories are created by default
{
"ConnectionStrings": {
"DefaultConnection": "Data Source=storymate.db"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}{
"ConnectionStrings": {
"DefaultConnection": "Data Source=storymate.db"
},
"GeminiApiKey": "your-production-api-key"
}- Register an Account: Click "Get Started Free" on the landing page
- Login: Use your credentials to access your personal dashboard
- Create Your First Story: Click "Create New Story" to start writing
Manual Creation:
- Navigate to "Create New Story"
- Fill in the story details (title, genre, content)
- Optionally add a cover image URL
- Set privacy preferences
- Click "Save Story"
AI-Powered Creation:
- Go to "Create New Story"
- In the AI Story Generator section, enter a creative prompt
- Select a genre (optional)
- Choose between:
- Generate Story: Creates content for you to review and edit
- Generate & Save Story: Automatically creates and saves the story
- View Stories: Access your personal story library
- Edit Stories: Click "Edit" on any story to modify it
- Delete Stories: Remove stories you no longer need
- Read Stories: Click "Read" to view the full story
- Statistics Overview: View total stories, users, and content distribution
- Recent Activity: Monitor latest stories and user registrations
- Quick Navigation: Access management sections
- View All Stories: Complete inventory of platform stories
- Toggle Visibility: Switch stories between public/private
- Delete Stories: Remove inappropriate or unwanted content
- Author Tracking: Monitor story ownership and creation
- User Overview: Complete list of registered users
- Story Statistics: Track user activity and story creation
- Account Information: Monitor user details and engagement
- Authentication: Secure user registration and login
- Authorization: Role-based access control
- CSRF Protection: Anti-forgery tokens on all forms
- Input Validation: Comprehensive data validation
- SQL Injection Prevention: Entity Framework parameterized queries
- XSS Protection: Razor view encoding
- Security Headers: Production-ready security configurations
-
Main Application
cd StoryMate dotnet run -
Admin Application (separate instance)
cd StoryMate.Admin dotnet run
# Add a new migration
dotnet ef migrations add MigrationName
# Update the database
dotnet ef database update
# Remove the last migration
dotnet ef migrations remove| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Landing page |
| GET | /Stories |
User's story library |
| GET | /Stories/Create |
Story creation form |
| POST | /Stories/Create |
Create new story |
| GET | /Stories/Details/{id} |
View specific story |
| GET | /Stories/Edit/{id} |
Edit story form |
| POST | /Stories/Edit/{id} |
Update story |
| POST | /Stories/GenerateAIStory |
AI story generation (AJAX) |
| POST | /Stories/GenerateAndSaveStory |
AI generation with save (AJAX) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /Admin |
Admin dashboard |
| GET | /Admin/Stories |
Story management |
| GET | /Admin/Users |
User management |
| POST | /Admin/ToggleStoryVisibility |
Toggle story visibility (AJAX) |
| POST | /Admin/DeleteStory |
Delete story (AJAX) |
This project was developed by a team of three dedicated developers as part of the Computer Engineering program.
| Developer | Roll Number | Role | Key Contributions |
|---|---|---|---|
| Yash Karthiya | CE030 | Admin & Platform Management Lead | Admin dashboard, user statistics, story visibility management, platform analytics |
| Akshat Dhanak | CE074 | Authentication & Security Lead | User authentication system, login/registration core, ASP.NET Identity integration |
| Kalpesh Gangani | CE028 | AI & Story Management Lead | AI story generation logic, Gemini API integration, story management features |
Admin Side & Platform Management
- βοΈ Designed and implemented complete admin dashboard
- π Developed user statistics and analytics features
- ποΈ Created story visibility management system (public/private toggle)
- ποΈ Built admin story management interface
- π Implemented platform-wide analytics and monitoring
- π¨ Designed admin UI/UX with Bootstrap 4
Authentication & Security
- π Implemented ASP.NET Core Identity authentication system
- π€ Developed user registration and login functionality
- π Integrated secure password hashing and validation
- π‘οΈ Set up authorization and role-based access control
- π Created user session management
- π Implemented security features (CSRF protection, XSS prevention)
AI Integration & Story Management
- π§ Integrated Google Gemini 2.5 Pro API for AI story generation
- βοΈ Developed core story generation logic and algorithms
- π Built story management features (create, edit, delete, read)
- π Implemented genre-based story categorization
- πΎ Designed story database schema and models
- π Created AI prompt processing and response handling
All team members collaborated on:
- ποΈ Overall application architecture and design
- ποΈ Database design and Entity Framework Core setup
- π¨ UI/UX consistency and responsive design
- π§ͺ Testing and debugging
- π Documentation and README preparation
- π Deployment configuration and setup
- Google Gemini API for AI story generation
- ASP.NET Core for the web framework
- Bootstrap for the UI framework
- Font Awesome for icons
- Entity Framework Core for data access
Made with β€οΈ by the StoryMate Team
Transform your ideas into captivating stories with the power of AI!