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
This commit is contained in:
3
.eslintrc.json
Normal file
3
.eslintrc.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "next/core-web-vitals"
|
||||
}
|
||||
80
.gitignore
vendored
Normal file
80
.gitignore
vendored
Normal file
@@ -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
|
||||
62
README.md
Normal file
62
README.md
Normal file
@@ -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.
|
||||
5
next-env.d.ts
vendored
Normal file
5
next-env.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||
18
next.config.js
Normal file
18
next.config.js
Normal file
@@ -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;
|
||||
47
package.json
Normal file
47
package.json
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
6
postcss.config.js
Normal file
6
postcss.config.js
Normal file
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
||||
73
tailwind.config.js
Normal file
73
tailwind.config.js
Normal file
@@ -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'),
|
||||
],
|
||||
}
|
||||
28
tsconfig.json
Normal file
28
tsconfig.json
Normal file
@@ -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"]
|
||||
}
|
||||
Reference in New Issue
Block a user