commit 5a18ec9e87aa484e48237b67e82a8893a6ace486 Author: ske087 Date: Wed Jul 23 12:20:20 2025 +0300 Initial commit: Next.js motorcycle adventure website setup - Configure Next.js 14 with TypeScript and App Router - Set up Tailwind CSS for styling - Add comprehensive dependencies for motorcycle adventure features - Configure authentication with NextAuth.js - Set up map integration with React Leaflet - Add GPX file support for route tracking - Configure image processing and file uploads - Set up forms, charts, and animations - Add ESLint and development tooling diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..bffb357 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5fe10fa --- /dev/null +++ b/.gitignore @@ -0,0 +1,80 @@ +# Dependencies +node_modules/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Production builds +.next/ +out/ +dist/ +build/ + +# Environment variables +.env +.env.local +.env.development.local +.env.test.local +.env.production.local + +# IDE files +.vscode/ +.idea/ +*.swp +*.swo + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Coverage directory used by tools like istanbul +coverage/ + +# nyc test coverage +.nyc_output + +# Dependency directories +jspm_packages/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# Next.js +.next + +# Prisma +prisma/migrations/ + +# Uploads +public/uploads/ + +# Database +*.db +*.sqlite diff --git a/README.md b/README.md new file mode 100644 index 0000000..e61f866 --- /dev/null +++ b/README.md @@ -0,0 +1,62 @@ +# Moto Adventure Website + +A Next.js-based website for motorcycle adventure enthusiasts, featuring route tracking, blog posts, and community features. + +## Features + +- 🏍️ Motorcycle adventure route tracking with GPX support +- πŸ“ Blog system for sharing adventure stories +- πŸ—ΊοΈ Interactive maps with Leaflet integration +- πŸ‘€ User authentication with NextAuth.js +- πŸ“Š Analytics and charts with Recharts +- πŸ“± Responsive design with Tailwind CSS +- πŸ–ΌοΈ Image upload and processing with Sharp +- 🎨 Smooth animations with Framer Motion + +## Tech Stack + +- **Framework:** Next.js 14 with App Router +- **Language:** TypeScript +- **Styling:** Tailwind CSS +- **Database:** Prisma ORM +- **Authentication:** NextAuth.js +- **Maps:** React Leaflet +- **Forms:** React Hook Form +- **Icons:** Lucide React +- **Animation:** Framer Motion + +## Getting Started + +1. Install dependencies: + ```bash + npm install + ``` + +2. Set up environment variables: + ```bash + cp .env.example .env.local + ``` + +3. Set up the database: + ```bash + npx prisma generate + npx prisma db push + ``` + +4. Run the development server: + ```bash + npm run dev + ``` + +5. Open [http://localhost:3000](http://localhost:3000) in your browser. + +## Development + +- `npm run dev` - Start development server +- `npm run build` - Build for production +- `npm run start` - Start production server +- `npm run lint` - Run ESLint + +## License + +This project is private and proprietary. diff --git a/next-env.d.ts b/next-env.d.ts new file mode 100644 index 0000000..4f11a03 --- /dev/null +++ b/next-env.d.ts @@ -0,0 +1,5 @@ +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/next.config.js b/next.config.js new file mode 100644 index 0000000..1f32629 --- /dev/null +++ b/next.config.js @@ -0,0 +1,18 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + experimental: { + appDir: true, + }, + images: { + domains: ['localhost', 'res.cloudinary.com'], + }, + webpack: (config) => { + config.module.rules.push({ + test: /\.gpx$/, + use: 'raw-loader', + }); + return config; + }, +}; + +module.exports = nextConfig; diff --git a/package.json b/package.json new file mode 100644 index 0000000..b78036c --- /dev/null +++ b/package.json @@ -0,0 +1,47 @@ +{ + "name": "moto-adv-website", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "next": "14.2.18", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "@types/node": "^20.17.9", + "@types/react": "^18.3.17", + "@types/react-dom": "^18.3.5", + "typescript": "^5.7.2", + "tailwindcss": "^3.4.17", + "postcss": "^8.4.41", + "autoprefixer": "^10.4.20", + "eslint": "^8.57.1", + "eslint-config-next": "14.2.18", + "framer-motion": "^11.11.17", + "lucide-react": "^0.469.0", + "react-hook-form": "^7.54.0", + "next-auth": "^4.24.10", + "@next-auth/prisma-adapter": "^1.0.7", + "prisma": "^5.22.0", + "@prisma/client": "^5.22.0", + "bcryptjs": "^2.4.3", + "@types/bcryptjs": "^2.4.6", + "react-leaflet": "^4.2.1", + "leaflet": "^1.9.4", + "@types/leaflet": "^1.9.14", + "gpx-parser-builder": "^1.7.2", + "multer": "^1.4.5-lts.1", + "@types/multer": "^1.4.12", + "sharp": "^0.33.5", + "react-dropzone": "^14.2.10", + "recharts": "^2.13.3" + }, + "devDependencies": { + "@tailwindcss/typography": "^0.5.15", + "@tailwindcss/forms": "^0.5.9" + } +} diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..33ad091 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..6e1638e --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,73 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: [ + './src/pages/**/*.{js,ts,jsx,tsx,mdx}', + './src/components/**/*.{js,ts,jsx,tsx,mdx}', + './src/app/**/*.{js,ts,jsx,tsx,mdx}', + ], + theme: { + extend: { + colors: { + primary: { + 50: '#fef7ee', + 100: '#fcecd6', + 200: '#f8d4ad', + 300: '#f3b679', + 400: '#ec8f43', + 500: '#e8711e', + 600: '#d95914', + 700: '#b44213', + 800: '#903517', + 900: '#752d15', + 950: '#3f1408', + }, + dark: { + 50: '#f6f6f6', + 100: '#e7e7e7', + 200: '#d1d1d1', + 300: '#b0b0b0', + 400: '#888888', + 500: '#6d6d6d', + 600: '#5d5d5d', + 700: '#4f4f4f', + 800: '#454545', + 900: '#3d3d3d', + 950: '#1a1a1a', + }, + }, + backgroundImage: { + 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', + 'gradient-conic': + 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', + 'hero-pattern': "url('/images/hero-bg.jpg')", + }, + fontFamily: { + 'adventure': ['Roboto Condensed', 'sans-serif'], + 'body': ['Inter', 'sans-serif'], + }, + animation: { + 'parallax': 'parallax 1s ease-out forwards', + 'fade-in': 'fadeIn 0.6s ease-out forwards', + 'slide-up': 'slideUp 0.8s ease-out forwards', + }, + keyframes: { + parallax: { + '0%': { transform: 'translateY(0px)' }, + '100%': { transform: 'translateY(-50px)' }, + }, + fadeIn: { + '0%': { opacity: '0', transform: 'translateY(20px)' }, + '100%': { opacity: '1', transform: 'translateY(0px)' }, + }, + slideUp: { + '0%': { opacity: '0', transform: 'translateY(60px)' }, + '100%': { opacity: '1', transform: 'translateY(0px)' }, + }, + }, + }, + }, + plugins: [ + require('@tailwindcss/typography'), + require('@tailwindcss/forms'), + ], +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..abb59dc --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "es6"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +}