rmslop
๐ฏSkillfrom revokslab/shipfree
rmslop skill from revokslab/shipfree
Installation
npx add-skill revokslab/shipfree --skill rmslopSkill Details
Overview
# โก ShipFree V2 - Revamping
Hi there! ๐
ShipFree is a free alternative to ShipFast, designed to simplify and optimize your shipping process. Itโs built using modern web technologies like Next.js, Bun, Stripe, Drizzle ORM, Postgres and Tailwindcss.
Features
- SEO Optimization
- User authentication with Better-Auth
- Stripe, Polar, Autumn Billing, Dodo Payments, Commet and Creem integration
- Email messaging via Resend, Postmark, Plunk, and Nodemailer
- Modern UI built with Next.js, TailwindCSS, and BaseUI
- Bun as runtime and package manager
- Drizzle ORM and Postgres for database operations
- Internationalization (i18n) with next-intl supporting English, French, and Spanish
Docs
For full documentation, visit: [ShipFree Docs](https://shipfree.revoks.dev/docs)
Code of Conduct
Please read our [Code of Conduct](CODE_OF_CONDUCT.md) before contributing.
Contributing
For people who want to contribute, please refer to [CONTRIBUTING.md](CONTRIBUTING.md).
Internationalization (i18n) Navigation
ShipFree includes internationalization support using next-intl with automatic locale routing. The template supports English (en), French (fr), and Spanish (es) out of the box.
Navigation Components and Hooks
The i18n/navigation.ts file exports internationalized versions of Next.js navigation components and hooks that automatically handle locale prefixes:
Link- Internationalized Link component that automatically prefixes routes with the current localeredirect- Server-side redirect function that preserves localeusePathname- Hook that returns the pathname without the locale prefixuseRouter- Hook for programmatic navigation with locale support
Usage Examples
#### Using the Link Component
```tsx
import { Link } from '@/i18n/navigation'
// Automatically includes locale prefix (e.g., /en/about, /fr/about)
About
// Switch to a different locale
ร propos
```
#### Using Navigation Hooks
```tsx
'use client'
import { useRouter, usePathname } from '@/i18n/navigation'
import { useLocale } from 'next-intl'
export function MyComponent() {
const router = useRouter()
const pathname = usePathname()
const locale = useLocale()
// Navigate to a route (automatically includes locale)
const handleClick = () => {
router.push('/dashboard')
}
// Switch locale for current page
const switchLanguage = (newLocale: string) => {
router.replace(pathname, { locale: newLocale })
}
return (
Current locale: {locale} Current pathname: {pathname}
)
}
```
#### Using Translations
```tsx
// Server Component
import { getTranslations } from 'next-intl/server'
export default async function ServerPage() {
const t = await getTranslations('MyPage')
return {t('title')}
}
// Client Component
'use client'
import { useTranslations } from 'next-intl'
export default function ClientPage() {
const t = useTranslations('MyPage')
return {t('title')}
}
```
Adding New Locales
To add a new locale:
- Add the locale to
i18n/routing.ts:
```ts
locales: ['en', 'fr', 'es', 'de'], // Add 'de' for German
```
- Create a translation file in
messages/:
```json
// messages/de.json
{
"PRICING": "Preise"
}
```
- Update the
localeNamesobject incomponents/language-switcher.tsx:
```tsx
const localeNames: Record
en: 'English',
fr: 'Franรงais',
es: 'Espaรฑol',
de: 'Deutsch', // Add German
}
```
Route Structure
All routes are automatically prefixed with the locale:
/or/enโ English homepage/frโ French homepage/esโ Spanish homepage/en/aboutโ English about page/fr/aboutโ French about page