Skip to content

ForSure is a simple, structured documentation language built for clarity, speed, and consistency across teams and tools.

Notifications You must be signed in to change notification settings

elicharlese/ForSure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

45 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ForSure

A modern, full-stack web application built with Next.js 15, featuring advanced animations, authentication, and AI-powered features.

Next.js React TypeScript Tailwind CSS MongoDB

✨ Features

  • πŸš€ Modern Stack: Built with Next.js 15, React 19, and TypeScript
  • ⚑ Turbopack: Lightning-fast development with Turbopack bundler
  • 🎨 Beautiful UI: Responsive design with Tailwind CSS and Radix UI components
  • πŸ” Authentication: Secure JWT-based authentication system
  • πŸ“Š Database: MongoDB integration with Mongoose ODM
  • 🎭 Animations: Smooth animations powered by GSAP and Framer Motion
  • πŸŒ™ Dark Mode: Built-in dark/light theme support
  • πŸ“± Responsive: Mobile-first responsive design
  • πŸ” Search: Advanced search functionality
  • πŸ“ Blog: Built-in blog system
  • πŸ’Ό Career Pages: Job listings and career information
  • πŸ“š Documentation: Comprehensive docs with interactive examples
  • πŸ€– AI Features: AI-powered functionality and chat system

πŸ› οΈ Tech Stack

Frontend

  • Framework: Next.js 15.2.4 with App Router
  • Language: TypeScript 5
  • Styling: Tailwind CSS 3.4.17
  • UI Components: Radix UI primitives
  • Animations: GSAP, Framer Motion
  • Forms: React Hook Form with Zod validation
  • State Management: React Context API
  • Theme: next-themes for dark/light mode

Backend

  • Runtime: Node.js with Next.js API routes
  • Database: MongoDB with Mongoose ODM
  • Authentication: JWT with bcryptjs
  • Validation: Zod schema validation
  • File Upload: Built-in file handling

Development Tools

  • Bundler: Turbopack (development) / Webpack (production)
  • Linting: ESLint with Next.js config
  • Package Manager: npm/pnpm
  • Version Control: Git

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or pnpm
  • MongoDB (local or Atlas)

Installation

  1. Clone the repository

    git clone https://github.com/elicharlese/ForSure.git
    cd ForSure
  2. Install dependencies

    npm install
    # or
    pnpm install
  3. Set up environment variables

    cp .env.example .env.local

    Configure your environment variables:

    # Database
    MONGODB_URI=mongodb://localhost:27017/forsure
    
    # Authentication
    JWT_SECRET=your-super-secret-jwt-key-here
    
    # App Configuration
    NEXT_PUBLIC_APP_URL=http://localhost:3000
    NODE_ENV=development
  4. Start the development server

    npm run dev
    # or with Turbopack (recommended)
    npm run turbo
  5. Open your browser Navigate to http://localhost:3000

πŸ“ Project Structure

ForSure/
β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”œβ”€β”€ api/               # API routes
β”‚   β”‚   β”œβ”€β”€ auth/          # Authentication endpoints
β”‚   β”‚   β”œβ”€β”€ projects/      # Project management
β”‚   β”‚   β”œβ”€β”€ chat/          # AI chat functionality
β”‚   β”‚   └── users/         # User management
β”‚   β”œβ”€β”€ (pages)/           # Application pages
β”‚   β”‚   β”œβ”€β”€ about/         # About page
β”‚   β”‚   β”œβ”€β”€ blog/          # Blog system
β”‚   β”‚   β”œβ”€β”€ careers/       # Career pages
β”‚   β”‚   β”œβ”€β”€ docs/          # Documentation
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ globals.css        # Global styles
β”‚   β”œβ”€β”€ layout.tsx         # Root layout
β”‚   └── page.tsx           # Home page
β”œβ”€β”€ components/            # Reusable components
β”‚   β”œβ”€β”€ ui/               # Base UI components
β”‚   β”œβ”€β”€ animated-*.tsx    # Animation components
β”‚   β”œβ”€β”€ docs-*.tsx        # Documentation components
β”‚   └── ...
β”œβ”€β”€ contexts/             # React contexts
β”œβ”€β”€ hooks/                # Custom React hooks
β”œβ”€β”€ lib/                  # Utility libraries
β”‚   β”œβ”€β”€ auth.ts           # Authentication utilities
β”‚   β”œβ”€β”€ db.ts             # Database connection
β”‚   └── utils.ts          # General utilities
β”œβ”€β”€ models/               # Database models
β”‚   β”œβ”€β”€ User.ts           # User model
β”‚   β”œβ”€β”€ Project.ts        # Project model
β”‚   └── Team.ts           # Team model
β”œβ”€β”€ public/               # Static assets
└── styles/               # Additional styles

πŸ”§ Development

Available Scripts

# Development with Turbopack (recommended)
npm run dev

# Development with Webpack
npm run dev:webpack

# Production build
npm run build

# Start production server
npm run start

# Lint code
npm run lint

# Turbopack development (alias)
npm run turbo

Environment Variables

Create a .env.local file with the following variables:

# Required
MONGODB_URI=mongodb://localhost:27017/forsure
JWT_SECRET=your-super-secret-jwt-key-here

# Optional
NEXT_PUBLIC_APP_URL=http://localhost:3000
NODE_ENV=development
NEXT_PUBLIC_ANALYTICS_ID=your-analytics-id

πŸ” Authentication

The application includes a complete authentication system:

  • Registration: /register
  • Login: /login
  • Password Reset: /forgot-password
  • Protected Routes: Automatic redirection for authenticated content
  • JWT Tokens: Secure token-based authentication
  • Password Hashing: bcryptjs for secure password storage

API Endpoints

POST /api/auth/register    # User registration
POST /api/auth/login       # User login
POST /api/auth/logout      # User logout
GET  /api/auth/me          # Get current user
POST /api/auth/refresh     # Refresh JWT token

πŸ“Š Database Models

User Model

{
  _id: ObjectId
  email: string
  password: string (hashed)
  name: string
  avatar?: string
  role: 'user' | 'admin'
  createdAt: Date
  updatedAt: Date
}

Project Model

{
  _id: ObjectId
  title: string
  description: string
  owner: ObjectId (User)
  collaborators: ObjectId[] (Users)
  status: 'active' | 'completed' | 'archived'
  createdAt: Date
  updatedAt: Date
}

🎨 UI Components

The application uses a comprehensive set of UI components built on Radix UI:

  • Forms: Input, Textarea, Select, Checkbox, Radio
  • Navigation: Dropdown, Menu, Tabs, Breadcrumb
  • Feedback: Toast, Alert, Progress, Badge
  • Overlay: Dialog, Popover, Tooltip, Sheet
  • Data Display: Table, Card, Avatar, Separator

Example Usage

import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Card } from "@/components/ui/card"

export function MyComponent() {
  return (
    <Card className="p-6">
      <Input placeholder="Enter your name" />
      <Button className="mt-4">Submit</Button>
    </Card>
  )
}

πŸš€ Deployment

Vercel (Recommended)

  1. Connect to Vercel

    npm i -g vercel
    vercel
  2. Set Environment Variables Configure the following in your Vercel dashboard:

    • MONGODB_URI
    • JWT_SECRET
    • NEXT_PUBLIC_APP_URL
  3. Deploy

    vercel --prod

Other Platforms

The application can be deployed to any platform that supports Next.js:

  • Netlify: Use the Next.js build command
  • Railway: Connect your GitHub repository
  • DigitalOcean: Use App Platform with Node.js
  • AWS: Use Amplify or EC2 with PM2

πŸ§ͺ Testing

# Run tests (when available)
npm test

# Run tests in watch mode
npm run test:watch

# Run tests with coverage
npm run test:coverage

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
  3. Commit your changes
    git commit -m 'Add some amazing feature'
  4. Push to the branch
    git push origin feature/amazing-feature
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Use ESLint and Prettier for code formatting
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation as needed

πŸ“ License

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

πŸ™ Acknowledgments

  • Next.js - The React framework for production
  • Tailwind CSS - A utility-first CSS framework
  • Radix UI - Low-level UI primitives
  • GSAP - Professional-grade animation
  • MongoDB - The database for modern applications

πŸ“ž Support


Built with ❀️ by the ForSure team

⭐ Star us on GitHub β€’ πŸ› Report Bug β€’ ✨ Request Feature

About

ForSure is a simple, structured documentation language built for clarity, speed, and consistency across teams and tools.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages