Skip to content

OJAYcode/NestShare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ  NestShare - Comprehensive Personal Financial Management Platform

ASP.NET Core MongoDB Bootstrap License Build Status

A modern, feature-rich financial management application built with ASP.NET Core MVC and MongoDB

๐Ÿš€ Features โ€ข ๐Ÿ“ฅ Installation โ€ข ๐Ÿ—๏ธ Architecture โ€ข ๐Ÿ“š Documentation โ€ข ๐Ÿค Contributing


๐ŸŽฏ Overview

NestShare is a comprehensive personal financial management platform designed to help individuals and groups manage their finances effectively. Built with modern web technologies and following best practices, it provides a robust solution for budgeting, savings tracking, loan management, and collaborative financial planning through thrift groups.

๐ŸŒŸ Key Highlights

  • ๐Ÿฆ Complete Financial Ecosystem: Manage budgets, savings, loans, and group finances in one place
  • ๐Ÿ‘ฅ Collaborative Finance: Thrift group functionality for community savings
  • ๐Ÿ“Š Smart Analytics: Advanced financial reporting and visualization
  • ๐Ÿ”’ Enterprise Security: ASP.NET Core Identity with role-based access control
  • ๐Ÿ“ฑ Responsive Design: Modern, mobile-first UI with Bootstrap 5
  • โšก High Performance: MongoDB for scalable data management
  • ๐Ÿ”ง Extensible Architecture: Clean, maintainable codebase following MVC patterns

๐Ÿš€ Features

๐Ÿ’ฐ Core Financial Management

๐ŸŽฏ Dashboard & Overview
  • Financial Summary: Real-time overview of all financial metrics
  • Recent Transactions: Quick access to latest financial activities
  • Goal Progress: Visual tracking of savings and budget targets
  • Quick Actions: Fast access to common operations
  • Customizable Widgets: Personalized dashboard experience
๐Ÿ’ณ Budget Management
  • Smart Budget Creation: AI-powered budget recommendations
  • Category-based Budgeting: Organize expenses by custom categories
    • Housing & Utilities
    • Food & Dining
    • Transportation
    • Healthcare
    • Entertainment
    • Personal Care
    • Debt Payments
  • Budget Tracking: Real-time expense tracking against budgets
  • Variance Analysis: Compare actual vs. planned spending
  • Monthly/Annual Views: Flexible time period management
  • Budget Templates: Reusable budget structures
๐ŸŽฏ Savings Goals & Management
  • Goal Setting: Create SMART savings goals with target amounts and dates
  • Progress Tracking: Visual progress indicators and milestone celebrations
  • Automated Contributions: Set up recurring savings transfers
  • Goal Categories: Organize goals by purpose (Emergency Fund, Vacation, etc.)
  • Achievement Analytics: Track completion rates and time-to-goal metrics
  • Savings Strategies: Built-in calculators for different saving approaches
๐Ÿฆ Loan Management System
  • Loan Portfolio: Comprehensive loan tracking and management
  • Payment Scheduling: Automated payment reminders and tracking
  • Amortization Calculations: Detailed payment breakdowns
  • Interest Analysis: Track interest paid over time
  • Early Payment Planning: Calculate benefits of extra payments
  • Multiple Loan Types: Support for mortgages, personal loans, auto loans
  • Payment History: Complete audit trail of all payments
๐Ÿ‘ฅ Thrift Groups (Collaborative Finance)
  • Group Creation: Start or join savings groups
  • Member Management: Invite and manage group participants
  • Contribution Tracking: Monitor member contributions and payouts
  • Rotation Management: Automated payout scheduling
  • Group Analytics: Financial health and participation metrics
  • Communication Tools: In-app messaging and notifications
  • Transparency: Full visibility into group financial activities

๐Ÿ” Security & User Management

๐Ÿ‘ค User Authentication & Authorization
  • Secure Registration: Email verification and strong password policies
  • Multi-factor Authentication: Enhanced security options
  • Role-based Access Control: Granular permission management
  • Session Management: Secure session handling with configurable timeouts
  • Password Recovery: Secure password reset functionality
  • Account Lockout: Protection against brute force attacks
๐Ÿ“Š User Profiles & Settings
  • Comprehensive Profiles: Personal and financial information management
  • Notification Preferences: Customizable alert settings
  • Privacy Controls: Data sharing and visibility settings
  • Theme Customization: Personalized user interface
  • Export/Import: Data portability and backup options

๐Ÿ“ˆ Analytics & Reporting

๐Ÿ“Š Financial Analytics
  • Spending Analysis: Detailed breakdown of expenses by category
  • Income vs. Expense Tracking: Monthly and yearly comparisons
  • Trend Analysis: Historical financial pattern recognition
  • Goal Progress Reports: Savings and budget achievement metrics
  • Cash Flow Statements: Comprehensive financial flow analysis
  • Custom Reports: User-defined reporting periods and parameters
๐Ÿ“ˆ Visualization Tools
  • Interactive Charts: Dynamic financial data visualization
  • Progress Bars: Visual goal and budget tracking
  • Trend Lines: Historical performance indicators
  • Comparison Charts: Period-over-period analysis
  • Export Capabilities: PDF and Excel report generation

๐Ÿ—๏ธ Architecture

๐ŸŽจ Technology Stack

๐Ÿ–ฅ๏ธ Backend ASP.NET Core C# MVC
๐Ÿ—„๏ธ Database MongoDB Entity Framework
๐ŸŽจ Frontend Bootstrap JavaScript Razor Pages
๐Ÿ” Authentication ASP.NET Identity JWT
๐Ÿ“ง Services Email Service Health Checks

๐Ÿ›๏ธ Project Structure

NestShare/
โ”œโ”€โ”€ ๐Ÿ“ Controllers/           # MVC Controllers for handling HTTP requests
โ”‚   โ”œโ”€โ”€ ๐Ÿ  HomeController.cs          # Landing page and general navigation
โ”‚   โ”œโ”€โ”€ ๐Ÿ“Š DashboardController.cs     # Financial dashboard and overview
โ”‚   โ”œโ”€โ”€ ๐Ÿ’ฐ BudgetController.cs        # Budget creation and management
โ”‚   โ”œโ”€โ”€ ๐ŸŽฏ SavingsController.cs       # Savings goals and tracking
โ”‚   โ”œโ”€โ”€ ๐Ÿฆ LoanController.cs          # Loan management and calculations
โ”‚   โ”œโ”€โ”€ ๐Ÿ‘ฅ ThriftGroupController.cs   # Group savings functionality
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ˆ ReportsController.cs       # Financial reporting and analytics
โ”‚   โ”œโ”€โ”€ โš™๏ธ SettingsController.cs      # User preferences and configuration
โ”‚   โ””โ”€โ”€ ๐Ÿ—„๏ธ DatabaseController.cs     # Database management utilities
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ Models/                # Data models and entities
โ”‚   โ”œโ”€โ”€ ๐Ÿ’ฐ Budget.cs                  # Budget entity and validation
โ”‚   โ”œโ”€โ”€ ๐ŸŽฏ SavingsGoal.cs            # Savings goals with progress tracking
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ SavingsEntry.cs           # Individual savings transactions
โ”‚   โ”œโ”€โ”€ ๐Ÿฆ Loan.cs                   # Loan information and calculations
โ”‚   โ”œโ”€โ”€ ๐Ÿ’ณ LoanPayment.cs            # Payment records and history
โ”‚   โ”œโ”€โ”€ ๐Ÿ‘ฅ ThriftGroup.cs            # Group savings management
โ”‚   โ”œโ”€โ”€ ๐Ÿ‘ค User.cs                   # User entity with financial profile
โ”‚   โ”œโ”€โ”€ ๐Ÿ“Š UserProfile.cs            # Extended user information
โ”‚   โ”œโ”€โ”€ ๐Ÿ’ธ Expense.cs                # Expense tracking and categorization
โ”‚   โ””โ”€โ”€ ๐Ÿฆ AccountBalance.cs         # Account balance management
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ ViewModels/            # Data transfer objects for views
โ”‚   โ”œโ”€โ”€ ๐Ÿ“Š DashboardViewModel.cs      # Dashboard data aggregation
โ”‚   โ”œโ”€โ”€ ๐Ÿ’ฐ BudgetViewModel.cs         # Budget display and input models
โ”‚   โ”œโ”€โ”€ ๐ŸŽฏ SavingsViewModel.cs        # Savings goal presentation
โ”‚   โ”œโ”€โ”€ ๐Ÿฆ LoanViewModel.cs           # Loan management interface
โ”‚   โ”œโ”€โ”€ ๐Ÿ‘ฅ ThriftGroupViewModel.cs    # Group management views
โ”‚   โ””โ”€โ”€ ๐Ÿ“ˆ ReportViewModel.cs         # Analytics and reporting data
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ Views/                 # Razor views and UI templates
โ”‚   โ”œโ”€โ”€ ๐Ÿ  Home/                      # Landing pages and static content
โ”‚   โ”œโ”€โ”€ ๐Ÿ“Š Dashboard/                 # Financial overview interfaces
โ”‚   โ”œโ”€โ”€ ๐Ÿ’ฐ Budget/                    # Budget management UI
โ”‚   โ”œโ”€โ”€ ๐ŸŽฏ Savings/                   # Savings goal interfaces
โ”‚   โ”œโ”€โ”€ ๐Ÿฆ Loan/                      # Loan management views
โ”‚   โ”œโ”€โ”€ ๐Ÿ‘ฅ ThriftGroup/               # Group collaboration UI
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ˆ Reports/                   # Analytics and reporting views
โ”‚   โ”œโ”€โ”€ โš™๏ธ Settings/                  # Configuration interfaces
โ”‚   โ””โ”€โ”€ ๐Ÿ”ง Shared/                    # Common layouts and partials
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ Data/                  # Database context and configuration
โ”‚   โ”œโ”€โ”€ ๐Ÿ—„๏ธ MongoDbContext.cs          # MongoDB connection and setup
โ”‚   โ”œโ”€โ”€ ๐Ÿ”ง ApplicationDbContext.cs    # Entity Framework context
โ”‚   โ””โ”€โ”€ โš™๏ธ Configurations/            # Entity configurations
โ”‚       โ””โ”€โ”€ ๐Ÿ” IdentityConfiguration.cs
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ Repositories/          # Data access layer
โ”‚   โ”œโ”€โ”€ ๐Ÿ’ฐ BudgetRepository.cs        # Budget data operations
โ”‚   โ”œโ”€โ”€ ๐ŸŽฏ SavingsGoalRepository.cs   # Savings goal data access
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ SavingsTransactionRepository.cs # Transaction management
โ”‚   โ”œโ”€โ”€ ๐Ÿฆ LoanRepository.cs          # Loan data operations
โ”‚   โ”œโ”€โ”€ ๐Ÿ’ณ LoanPaymentRepository.cs   # Payment data access
โ”‚   โ”œโ”€โ”€ ๐Ÿ‘ฅ ThriftGroupRepository.cs   # Group data management
โ”‚   โ”œโ”€โ”€ ๐Ÿ‘ค UserRepository.cs          # User data operations
โ”‚   โ”œโ”€โ”€ ๐Ÿ’ธ ExpenseRepository.cs       # Expense data access
โ”‚   โ””โ”€โ”€ ๐Ÿฆ AccountBalanceRepository.cs # Balance management
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ Services/              # Business logic and external services
โ”‚   โ”œโ”€โ”€ ๐Ÿ”ง LoanCalculationService.cs  # Loan calculations and amortization
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ง EmailSender.cs             # Email notification service
โ”‚   โ””โ”€โ”€ ๐Ÿฅ MongoDbHealthCheck.cs      # Database health monitoring
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ Identity/              # Custom identity providers
โ”‚   โ”œโ”€โ”€ ๐Ÿ‘ค MongoUserStore.cs          # MongoDB user store implementation
โ”‚   โ””โ”€โ”€ ๐Ÿ” MongoRoleStore.cs          # MongoDB role store implementation
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ Areas/                 # ASP.NET Areas for modular organization
โ”‚   โ””โ”€โ”€ ๐Ÿ” Identity/                  # Identity-related pages and functionality
โ”‚       โ””โ”€โ”€ ๐Ÿ“„ Pages/                 # Razor pages for authentication
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ wwwroot/               # Static web assets
โ”‚   โ”œโ”€โ”€ ๐ŸŽจ css/                       # Stylesheets and themes
โ”‚   โ”œโ”€โ”€ ๐Ÿ“œ js/                        # JavaScript files and libraries
โ”‚   โ”œโ”€โ”€ ๐Ÿ–ผ๏ธ images/                    # Application images and icons
โ”‚   โ””โ”€โ”€ ๐Ÿ“š lib/                       # Third-party libraries
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ Migrations/            # Database migrations
โ”‚   โ””โ”€โ”€ ๐Ÿ”ง Entity Framework migration files
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ Properties/            # Application properties
โ”‚   โ””โ”€โ”€ โš™๏ธ launchSettings.json        # Development server configuration
โ”‚
โ”œโ”€โ”€ โš™๏ธ Program.cs             # Application entry point and DI configuration
โ”œโ”€โ”€ ๐Ÿš€ Startup.cs             # Application startup configuration
โ”œโ”€โ”€ ๐Ÿ“„ appsettings.json       # Application configuration
โ”œโ”€โ”€ ๐Ÿ—๏ธ Thrift.csproj          # Project file with dependencies
โ””โ”€โ”€ ๐Ÿ“– README.md              # This documentation file

๐Ÿ”„ Application Flow

graph TB
    A[๐ŸŒ Web Request] --> B[๐Ÿ›ก๏ธ Authentication Middleware]
    B --> C[๐ŸŽฏ MVC Controller]
    C --> D[๐Ÿ“Š Business Service]
    D --> E[๐Ÿ—„๏ธ Repository Layer]
    E --> F[๐Ÿƒ MongoDB Database]

    C --> G[๐Ÿ“ฑ View Model]
    G --> H[๐ŸŽจ Razor View]
    H --> I[๐Ÿ‘ค User Interface]

    style A fill:#e1f5fe
    style F fill:#c8e6c9
    style I fill:#fff3e0
Loading

๐Ÿ—„๏ธ Database Schema

Core Collections

๐Ÿ‘ค Users Collection
{
  "_id": "ObjectId",
  "userName": "string",
  "email": "string",
  "passwordHash": "string",
  "emailConfirmed": "boolean",
  "phoneNumber": "string",
  "twoFactorEnabled": "boolean",
  "lockoutEnd": "datetime",
  "accessFailedCount": "number",
  "profile": {
    "firstName": "string",
    "lastName": "string",
    "dateOfBirth": "datetime",
    "address": "string",
    "phoneNumber": "string",
    "occupation": "string",
    "monthlyIncome": "decimal"
  },
  "createdAt": "datetime",
  "updatedAt": "datetime"
}
๐Ÿ’ฐ Budgets Collection
{
  "_id": "ObjectId",
  "name": "string",
  "userId": "string",
  "month": "datetime",
  "totalIncome": "decimal",
  "additionalIncome": "decimal",
  "expenses": {
    "housing": "decimal",
    "food": "decimal",
    "transportation": "decimal",
    "healthcare": "decimal",
    "entertainment": "decimal",
    "personal": "decimal",
    "debt": "decimal",
    "other": "decimal"
  },
  "savingsAllocation": "decimal",
  "notes": "string",
  "createdAt": "datetime",
  "updatedAt": "datetime"
}
๐ŸŽฏ Savings Goals Collection
{
  "_id": "ObjectId",
  "title": "string",
  "description": "string",
  "targetAmount": "decimal",
  "currentAmount": "decimal",
  "targetDate": "datetime",
  "monthlyContribution": "decimal",
  "userId": "string",
  "iconClass": "string",
  "category": "string",
  "priority": "number",
  "isCompleted": "boolean",
  "createdAt": "datetime",
  "updatedAt": "datetime"
}
๐Ÿฆ Loans Collection
{
  "_id": "ObjectId",
  "loanName": "string",
  "principalAmount": "decimal",
  "currentBalance": "decimal",
  "interestRate": "decimal",
  "termInMonths": "number",
  "monthlyPayment": "decimal",
  "startDate": "datetime",
  "userId": "string",
  "loanType": "string",
  "lender": "string",
  "status": "string",
  "paymentSchedule": [
    {
      "paymentNumber": "number",
      "dueDate": "datetime",
      "principalAmount": "decimal",
      "interestAmount": "decimal",
      "totalPayment": "decimal",
      "remainingBalance": "decimal"
    }
  ],
  "createdAt": "datetime",
  "updatedAt": "datetime"
}
๐Ÿ‘ฅ Thrift Groups Collection
{
  "_id": "ObjectId",
  "name": "string",
  "description": "string",
  "adminUserId": "string",
  "contributionAmount": "decimal",
  "payoutFrequency": "string",
  "maxMembers": "number",
  "currentMembers": "number",
  "startDate": "datetime",
  "endDate": "datetime",
  "status": "string",
  "members": [
    {
      "userId": "string",
      "joinDate": "datetime",
      "totalContributions": "decimal",
      "payoutReceived": "boolean",
      "payoutDate": "datetime"
    }
  ],
  "rules": {
    "latePaymentFee": "decimal",
    "withdrawalPolicy": "string",
    "votingRights": "string"
  },
  "createdAt": "datetime",
  "updatedAt": "datetime"
}

๐Ÿ“ฅ Installation

๐Ÿ”ง Prerequisites

Before setting up NestShare, ensure you have the following installed:

๐Ÿ“‹ Requirements ๐Ÿ”— Download Links ๐Ÿ“ Notes
.NET 8.0 Download .NET 8.0 Required for running ASP.NET Core applications
MongoDB Download MongoDB Community Primary database for the application
Visual Studio Download Visual Studio Recommended IDE (or VS Code)
Git Download Git Version control system

๐Ÿš€ Quick Start

1๏ธโƒฃ Clone the Repository

# Clone the repository
git clone https://github.com/yourusername/nestshare.git

# Navigate to the project directory
cd nestshare

2๏ธโƒฃ Database Setup

๐Ÿƒ MongoDB Installation & Configuration

Automated Installation (Windows):

# Run the included MongoDB installer (Windows only)
./install_mongodb.bat

Manual Installation:

  1. Download MongoDB Community Edition

  2. Start MongoDB Service

    # Windows (as Administrator)
    net start MongoDB
    
    # macOS (with Homebrew)
    brew services start mongodb-community
    
    # Linux (systemd)
    sudo systemctl start mongod
  3. Verify Installation

    # Connect to MongoDB shell
    mongosh
    
    # In MongoDB shell, create the database
    use thrift_db

3๏ธโƒฃ Application Configuration

โš™๏ธ Configuration Steps
  1. Update Connection Strings

    Edit appsettings.json:

    {
      "ConnectionStrings": {
        "MongoDbConnection": "mongodb://localhost:27017"
      },
      "EmailSettings": {
        "SmtpServer": "smtp.gmail.com",
        "Port": 587,
        "SenderEmail": "your-email@gmail.com",
        "SenderName": "NestShare Financial App",
        "Username": "your-email@gmail.com",
        "Password": "your-app-password"
      }
    }
  2. Email Configuration (Optional)

    • For Gmail: Enable 2FA and generate an App Password
    • Update the EmailSettings section with your credentials
    • Other SMTP providers: Adjust server and port settings accordingly
  3. Development Settings Edit appsettings.Development.json for development-specific configurations:

    {
      "Logging": {
        "LogLevel": {
          "Default": "Information",
          "Microsoft.AspNetCore": "Warning"
        }
      }
    }

4๏ธโƒฃ Build and Run

# Restore NuGet packages
dotnet restore

# Build the application
dotnet build

# Run the application
dotnet run

The application will be available at:

  • HTTP: http://localhost:5226
  • HTTPS: https://localhost:7039

5๏ธโƒฃ Initial Setup

  1. Navigate to the Application

    • Open your browser and go to https://localhost:7039
  2. Database Health Check

    • Visit /health to verify MongoDB connection
    • Visit /MongoDbSetup for database initialization
  3. Create Your Account

    • Click "Register" to create your first user account
    • Complete the registration process
  4. Explore the Dashboard

    • Log in and explore the financial dashboard
    • Set up your first budget or savings goal

๐Ÿณ Docker Setup (Alternative)

๐Ÿณ Running with Docker
# Create a docker-compose.yml file
version: '3.8'
services:
  mongodb:
    image: mongo:7.0
    container_name: nestshare-mongo
    restart: unless-stopped
    ports:
      - "27017:27017"
    volumes:
      - mongodb_data:/data/db
    environment:
      MONGO_INITDB_DATABASE: thrift_db

  nestshare:
    build: .
    container_name: nestshare-app
    restart: unless-stopped
    ports:
      - "5000:80"
    depends_on:
      - mongodb
    environment:
      - ASPNETCORE_ENVIRONMENT=Production
      - ConnectionStrings__MongoDbConnection=mongodb://mongodb:27017

volumes:
  mongodb_data:

# Run with Docker Compose
docker-compose up -d

๐Ÿ› ๏ธ Development

๐Ÿ”จ Development Setup

๐Ÿ’ป Local Development Environment
  1. IDE Configuration

    # Open in Visual Studio
    start Thrift.sln
    
    # Or open in VS Code
    code .
  2. Debug Configuration

    • Set Thrift as the startup project
    • Configure breakpoints as needed
    • Use F5 to start debugging
  3. Hot Reload

    # Enable hot reload for faster development
    dotnet watch run

๐Ÿงช Testing

๐Ÿ”ฌ Running Tests
# Run all tests
dotnet test

# Run tests with coverage
dotnet test --collect:"XPlat Code Coverage"

# Run specific test project
dotnet test Tests/Thrift.Tests.csproj

๐Ÿ“ฆ Package Management

๐Ÿ“‹ Adding Dependencies
# Add a new package
dotnet add package PackageName

# Update packages
dotnet restore

# Remove a package
dotnet remove package PackageName

๐Ÿ”ง Configuration

๐Ÿ“Š Application Settings

โš™๏ธ Configuration Options

Connection Strings:

{
  "ConnectionStrings": {
    "MongoDbConnection": "mongodb://localhost:27017",
    "DefaultConnection": "Server=localhost;Database=thrift_db;User=root;Password=;"
  }
}

Email Settings:

{
  "EmailSettings": {
    "SmtpServer": "smtp.gmail.com",
    "Port": 587,
    "SenderEmail": "your-email@gmail.com",
    "SenderName": "NestShare Financial App",
    "Username": "your-email@gmail.com",
    "Password": "your-app-password"
  }
}

Security Configuration:

{
  "IdentityOptions": {
    "Password": {
      "RequireDigit": true,
      "RequireLowercase": true,
      "RequireUppercase": true,
      "RequiredLength": 6,
      "RequiredUniqueChars": 1
    },
    "Lockout": {
      "DefaultLockoutTimeSpan": "00:05:00",
      "MaxFailedAccessAttempts": 5,
      "AllowedForNewUsers": true
    }
  }
}

๐Ÿ” Environment Variables

๐ŸŒ Environment Configuration
# Development
ASPNETCORE_ENVIRONMENT=Development
ASPNETCORE_URLS=https://localhost:7039;http://localhost:5226

# Production
ASPNETCORE_ENVIRONMENT=Production
ASPNETCORE_URLS=https://yourdomain.com

# Database
MONGODB_CONNECTION_STRING=mongodb://localhost:27017
DATABASE_NAME=thrift_db

# Email
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your-email@gmail.com
SMTP_PASSWORD=your-app-password

๐Ÿ“š API Documentation

๐Ÿ”— Endpoints Overview

๐ŸŒ Available Endpoints

Authentication Endpoints

POST   /Identity/Account/Register    # User registration
POST   /Identity/Account/Login       # User login
POST   /Identity/Account/Logout      # User logout
GET    /Identity/Account/Manage      # Account management

Dashboard Endpoints

GET    /Dashboard                    # Financial overview
GET    /Dashboard/GetSummary         # Dashboard data API
POST   /Dashboard/UpdateWidgets      # Widget configuration

Budget Management

GET    /Budget                       # List budgets
GET    /Budget/Create                # Create budget form
POST   /Budget/Create                # Create budget
GET    /Budget/Edit/{id}             # Edit budget form
POST   /Budget/Edit/{id}             # Update budget
DELETE /Budget/Delete/{id}           # Delete budget

Savings Management

GET    /Savings                      # List savings goals
POST   /Savings/CreateGoal           # Create savings goal
POST   /Savings/AddEntry             # Add savings entry
GET    /Savings/Progress/{id}        # Goal progress data

Loan Management

GET    /Loan                         # List loans
POST   /Loan/Create                  # Create loan
GET    /Loan/Details/{id}            # Loan details
POST   /Loan/Payment                 # Record payment
GET    /Loan/Schedule/{id}           # Payment schedule

Thrift Groups

GET    /ThriftGroup                  # List groups
POST   /ThriftGroup/Create           # Create group
POST   /ThriftGroup/Join             # Join group
POST   /ThriftGroup/Contribute       # Make contribution

๐Ÿ“– API Usage Examples

๐Ÿ’ป Code Examples

Creating a Budget (JavaScript):

// Create a new budget
const budget = {
  name: "Monthly Budget - January 2024",
  totalIncome: 5000,
  housingExpenses: 1500,
  foodExpenses: 600,
  transportationExpenses: 400,
  savingsAllocation: 1000,
};

fetch("/Budget/Create", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    RequestVerificationToken: getAntiForgeryToken(),
  },
  body: JSON.stringify(budget),
})
  .then((response) => response.json())
  .then((data) => console.log("Budget created:", data));

Adding a Savings Goal (C#):

// Create a savings goal
var savingsGoal = new SavingsGoal
{
    Title = "Emergency Fund",
    TargetAmount = 10000,
    TargetDate = DateTime.Now.AddYears(1),
    MonthlyContribution = 833,
    UserId = userId
};

await _savingsGoalRepository.CreateAsync(savingsGoal);

๐Ÿ”’ Security

๐Ÿ›ก๏ธ Security Features

๐Ÿ” Authentication & Authorization
  • ASP.NET Core Identity: Robust user management system
  • Password Policies: Configurable password complexity requirements
  • Account Lockout: Protection against brute force attacks
  • Two-Factor Authentication: Enhanced security for sensitive operations
  • Role-Based Access Control: Granular permission management
  • Session Management: Secure session handling with configurable timeouts
๐Ÿ›ก๏ธ Data Protection
  • HTTPS Enforcement: All traffic encrypted in transit
  • Data Validation: Input validation and sanitization
  • SQL Injection Prevention: Parameterized queries and ORM usage
  • XSS Protection: Output encoding and CSP headers
  • CSRF Protection: Anti-forgery tokens on forms
  • Secure Headers: HSTS, X-Frame-Options, and other security headers

๐Ÿ”ง Security Configuration

โš™๏ธ Security Settings
// Identity Configuration (Program.cs)
services.Configure<IdentityOptions>(options =>
{
    // Password settings
    options.Password.RequireDigit = true;
    options.Password.RequireLowercase = true;
    options.Password.RequireNonAlphanumeric = false;
    options.Password.RequireUppercase = true;
    options.Password.RequiredLength = 6;
    options.Password.RequiredUniqueChars = 1;

    // Lockout settings
    options.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromMinutes(5);
    options.Lockout.MaxFailedAccessAttempts = 5;
    options.Lockout.AllowedForNewUsers = true;

    // User settings
    options.User.RequireUniqueEmail = true;
});

// Cookie Configuration
services.ConfigureApplicationCookie(options =>
{
    options.Cookie.HttpOnly = true;
    options.ExpireTimeSpan = TimeSpan.FromDays(5);
    options.LoginPath = "/Identity/Account/Login";
    options.AccessDeniedPath = "/Identity/Account/AccessDenied";
    options.SlidingExpiration = true;
});

๐Ÿš€ Deployment

โ˜๏ธ Cloud Deployment

๐ŸŒฉ๏ธ Azure Deployment
  1. Azure App Service

    # Create resource group
    az group create --name nestshare-rg --location "East US"
    
    # Create App Service plan
    az appservice plan create --name nestshare-plan --resource-group nestshare-rg --sku B1
    
    # Create web app
    az webapp create --name nestshare-app --resource-group nestshare-rg --plan nestshare-plan
    
    # Deploy from local Git
    az webapp deployment source config-local-git --name nestshare-app --resource-group nestshare-rg
  2. Azure Cosmos DB (MongoDB API)

    # Create Cosmos DB account
    az cosmosdb create --name nestshare-cosmos --resource-group nestshare-rg --kind MongoDB
    
    # Get connection string
    az cosmosdb keys list --name nestshare-cosmos --resource-group nestshare-rg --type connection-strings
๐Ÿšข Docker Production Deployment

Dockerfile:

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["Thrift.csproj", "."]
RUN dotnet restore "Thrift.csproj"
COPY . .
WORKDIR "/src"
RUN dotnet build "Thrift.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "Thrift.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Thrift.dll"]

Production docker-compose.yml:

version: "3.8"
services:
  nestshare:
    build: .
    ports:
      - "80:80"
      - "443:443"
    environment:
      - ASPNETCORE_ENVIRONMENT=Production
      - ASPNETCORE_URLS=https://+:443;http://+:80
      - ASPNETCORE_Kestrel__Certificates__Default__Password=your_cert_password
      - ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx
    volumes:
      - ./https:/https:ro
    depends_on:
      - mongodb

  mongodb:
    image: mongo:7.0
    restart: unless-stopped
    environment:
      MONGO_INITDB_DATABASE: thrift_db
    volumes:
      - mongodb_data:/data/db
    ports:
      - "27017:27017"

volumes:
  mongodb_data:

๐Ÿ”ง Production Configuration

โš™๏ธ Production Settings

appsettings.Production.json:

{
  "ConnectionStrings": {
    "MongoDbConnection": "mongodb://production-server:27017"
  },
  "Logging": {
    "LogLevel": {
      "Default": "Warning",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "EmailSettings": {
    "SmtpServer": "smtp.sendgrid.net",
    "Port": 587,
    "SenderEmail": "noreply@nestshare.com",
    "SenderName": "NestShare Financial App"
  },
  "AllowedHosts": "nestshare.com,www.nestshare.com"
}

Production Checklist:

  • HTTPS certificate configured
  • Connection strings updated
  • Email service configured
  • Error logging set up
  • Health checks enabled
  • Security headers configured
  • Database backups scheduled
  • Monitoring and alerting configured

๐Ÿค Contributing

We welcome contributions from the community! Here's how you can get involved:

๐ŸŽฏ How to Contribute

๐Ÿ”€ Fork and Pull Request Workflow
  1. Fork the Repository

    # Fork on GitHub and clone your fork
    git clone https://github.com/yourusername/nestshare.git
    cd nestshare
  2. Create a Feature Branch

    # Create and switch to a new branch
    git checkout -b feature/your-feature-name
  3. Make Changes

    • Write clean, well-documented code
    • Follow the existing code style and conventions
    • Add tests for new functionality
  4. Commit Changes

    # Stage and commit your changes
    git add .
    git commit -m "feat: add new budget analytics feature"
  5. Submit Pull Request

    • Push your branch to your fork
    • Create a pull request on the main repository
    • Provide a clear description of your changes

๐Ÿ“‹ Development Guidelines

๐Ÿ’ป Code Standards

C# Coding Standards:

// Use meaningful names
public class BudgetAnalysisService
{
    private readonly IBudgetRepository _budgetRepository;

    // XML documentation for public methods
    /// <summary>
    /// Calculates budget variance for the specified period
    /// </summary>
    /// <param name="userId">The user identifier</param>
    /// <param name="period">The analysis period</param>
    /// <returns>Budget variance analysis result</returns>
    public async Task<BudgetVarianceResult> CalculateVarianceAsync(
        string userId,
        DatePeriod period)
    {
        // Implementation
    }
}

JavaScript Standards:

// Use modern ES6+ syntax
const BudgetChart = {
  // Use meaningful function names
  async loadChartData(budgetId) {
    try {
      const response = await fetch(`/api/budget/${budgetId}/chart-data`);
      const data = await response.json();
      return data;
    } catch (error) {
      console.error("Failed to load chart data:", error);
      throw error;
    }
  },
};
๐Ÿงช Testing Requirements
  • Unit Tests: Write unit tests for all business logic
  • Integration Tests: Test controller endpoints and database operations
  • UI Tests: Test critical user workflows

Example Unit Test:

[Test]
public async Task CalculateLoanPayment_ValidInputs_ReturnsCorrectPayment()
{
    // Arrange
    var principal = 100000m;
    var annualRate = 0.05m;
    var termInMonths = 360;

    // Act
    var payment = _loanCalculationService.CalculateMonthlyPayment(
        principal, annualRate, termInMonths);

    // Assert
    Assert.That(payment, Is.EqualTo(536.82m).Within(0.01m));
}

๐Ÿ› Bug Reports

๐Ÿ” How to Report Bugs

When reporting bugs, please include:

  1. Environment Information

    • Operating System
    • .NET version
    • MongoDB version
    • Browser (if UI-related)
  2. Steps to Reproduce

    • Clear, numbered steps
    • Expected vs. actual behavior
    • Screenshots if applicable
  3. Additional Context

    • Error messages
    • Log files
    • Related issues

Bug Report Template:

## Bug Description

Brief description of the issue

## Environment

- OS: Windows 11
- .NET: 8.0
- Browser: Chrome 120.0

## Steps to Reproduce

1. Navigate to /Budget/Create
2. Fill in budget details
3. Click "Save Budget"
4. Error occurs

## Expected Behavior

Budget should be saved successfully

## Actual Behavior

Error message: "Unable to save budget"

## Additional Context

- Console shows 500 error
- Happens only with large budget amounts

๐Ÿ’ก Feature Requests

๐ŸŒŸ Suggesting New Features

We love feature suggestions! Please include:

  1. Use Case: Describe the problem or need
  2. Proposed Solution: Your idea for solving it
  3. Alternatives: Other approaches you've considered
  4. Mockups: Visual designs if applicable

Feature Request Template:

## Feature Description

Brief description of the requested feature

## Problem Statement

What problem does this solve?

## Proposed Solution

Detailed description of your proposed solution

## User Stories

- As a user, I want to...
- So that I can...

## Acceptance Criteria

- [ ] Criteria 1
- [ ] Criteria 2
- [ ] Criteria 3

## Additional Context

Any other context, mockups, or examples

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ“‹ License Summary

  • โœ… Commercial Use: You can use this software commercially
  • โœ… Modification: You can modify the source code
  • โœ… Distribution: You can distribute the software
  • โœ… Private Use: You can use this software privately
  • โŒ Liability: The authors are not liable for any damages
  • โŒ Warranty: No warranty is provided

๐Ÿ“ž Support

๐Ÿ†˜ Getting Help

๐Ÿ’ฌ Community Support
  • GitHub Discussions: Ask questions and share ideas
  • GitHub Issues: Report bugs and request features
  • Stack Overflow: Tag questions with nestshare
  • Email: support@nestshare.com (for urgent issues)
๐Ÿ“š Documentation
  • User Guide: /docs/user-guide.md
  • Developer Guide: /docs/developer-guide.md
  • API Reference: /docs/api-reference.md
  • Deployment Guide: /docs/deployment.md

๐Ÿ”ง Troubleshooting

โš ๏ธ Common Issues

MongoDB Connection Issues:

# Check if MongoDB is running
mongosh --eval "db.runCommand({ping: 1})"

# Restart MongoDB service
sudo systemctl restart mongod  # Linux
net stop MongoDB && net start MongoDB  # Windows

Build Errors:

# Clean and restore packages
dotnet clean
dotnet restore
dotnet build

Email Service Issues:

  • Verify SMTP settings in appsettings.json
  • Check firewall and antivirus settings
  • For Gmail: Enable 2FA and use App Passwords

๐Ÿ“ˆ Roadmap

๐ŸŽฏ Upcoming Features

๐Ÿ—“๏ธ Version 2.0 (Q2 2024)
  • Mobile App: React Native mobile application
  • AI Insights: Machine learning-powered financial recommendations
  • Investment Tracking: Portfolio management and tracking
  • Cryptocurrency Support: Digital asset management
  • Advanced Analytics: Predictive financial modeling
  • Multi-currency Support: International financial management
  • Bank Integration: Direct bank account connections
  • Automated Categorization: AI-powered expense categorization
๐Ÿ”ฎ Future Versions
  • Financial Planning: Retirement and life goal planning
  • Tax Management: Tax calculation and filing assistance
  • Insurance Tracking: Policy management and claims tracking
  • Family Finance: Multi-user family account management
  • Business Features: Small business financial management
  • API Platform: Public API for third-party integrations
  • White-label Solution: Customizable platform for organizations

๐Ÿ™ Acknowledgments

๐Ÿ‘ฅ Contributors

We thank all the amazing contributors who have helped make NestShare better:

  • Core Team: Development and maintenance
  • Community Contributors: Bug fixes and feature additions
  • Beta Testers: Early feedback and testing
  • Documentation Writers: Improving our docs

๐Ÿ› ๏ธ Technologies

Special thanks to the open-source projects that make NestShare possible:

  • ASP.NET Core: Microsoft's web framework
  • MongoDB: NoSQL database platform
  • Bootstrap: CSS framework for responsive design
  • Chart.js: JavaScript charting library
  • Font Awesome: Icon library
  • jQuery: JavaScript library

๐Ÿ’ก Inspiration

This project was inspired by the need for accessible, comprehensive financial management tools that work for individuals and groups alike.


๐ŸŒŸ Star Us on GitHub!

If you find NestShare useful, please consider giving us a star on GitHub! It helps others discover the project and motivates our continued development.

GitHub stars


Built with โค๏ธ by the NestShare Team

๐Ÿ“ง Email โ€ข ๐Ÿ™ GitHub โ€ข ๐ŸŒ Website โ€ข ๐Ÿ“ฑ Twitter


๐Ÿ“Š Project Statistics

GitHub repo size GitHub code size in bytes GitHub last commit GitHub commit activity GitHub contributors GitHub issues GitHub pull requests


Last updated: January 2024

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages