PackRat-AI/PackRat
PackRat is a versatile adventure planner tailored for outdoor enthusiasts. It simplifies the process of organizing trips from a simple day hike to cross-country journeys.
PackRat π
PackRat is the ultimate adventure planner designed for those who love to explore the great outdoors. Our app helps users plan and organize their trips with ease, whether it's a weekend camping trip, a day hike, or a cross-country road trip.
With PackRat, you can create and manage trips, discover new destinations, and stay informed with up-to-date weather forecasts. Our app integrates with Mapbox to provide you with accurate maps and directions to your destinations, as well as suggestions for popular outdoor activities based on the location and season of your trip.
So pack your bags, grab your friends, and get ready for your next adventure with PackRat!
Note
This project is currently in alpha. Please report any issues or bugs you encounter. Thank you for your patience and support!
Important
This project is still in development and may contain bugs or issues. Please use the app with caution and report any problems you encounter. Thank you for your understanding and cooperation.
Table of Contents
- PackRat π
- Table of Contents
- Overview π
- Documentation π
- Features π
- Technologies used π»
- π Folder layout
- π Add new dependencies
- Dependency management
- Local installation π²
- API Architecture
- Contributing π€
- User Stories:
- User Features:
- Pack Features:
- Trip Features:
- Items Feature:
- Feed Feature:
- π Special Thanks
- License π
Overview π
With PackRat, you can:
- Create and manage trips.
- Discover new destinations.
- Stay informed with up-to-date weather forecasts.
- Access accurate maps and directions with our integration to Mapbox.
- Get suggestions for popular outdoor activities based on your trip's location and season.
So pack your bags, grab your friends, and get ready for your next adventure with PackRat!
Documentation π
Warning
While the app is in alpha, please be aware that there may be bugs or issues. We appreciate your patience and support as we work to improve the app. Data may be lost or corrupted during this time, so please use the app with caution. Thank you for your understanding and cooperation.
Features π
- Create and manage trips: users can create new trips and manage existing ones by adding details such as dates, locations, and activities.
- Map integration: PackRat integrates with Mapbox to provide users with accurate maps and directions to their destinations.
- Activity suggestions: the app suggests popular outdoor activities based on the location and season of the trip.
- Packing list: users can create and manage packing lists for their trips to ensure they have everything they need.
- Weather forecast: PackRat provides up-to-date weather forecasts for the trip location to help users prepare accordingly.
- User authentication: the app uses user authentication to ensure privacy and data security.
Technologies used π»
PackRat is built using the following modern technologies:
- React Native + Expo: Cross-platform mobile development with Expo Router
- Next.js: Server-side rendering for web applications (landing page and guides)
- Hono.js: Fast, lightweight web framework running on Cloudflare Workers
- PostgreSQL + Drizzle ORM: Type-safe database operations with Neon serverless database
- Jotai + TanStack Query: Modern state management and data fetching
- AI SDK + OpenAI: AI-powered features and content generation
- Bun: Fast JavaScript runtime and package manager
- Biome: Modern linting and formatting toolchain
- TypeScript: Full type safety across the entire stack
- Tailwind CSS + NativeWind: Utility-first styling for web and mobile
- Mapbox: Location data platform for mobile and web applications
π Folder layout
The main folders are:
-
apps/- Applicationsexpo/- React Native mobile app with Expo Routerapp/- App router screens and layoutsfeatures/- Feature-based modules (auth, packs, etc.)components/- Reusable UI componentsatoms/- Jotai atoms for global stateproviders/- React context providerslib/- Utility libraries and configurationsassets/- Images, fonts, and other static assets
landing/- Next.js landing page websiteguides/- Next.js documentation and guides site
-
packages/- Shared packages across appsapi/- Hono.js API server running on Cloudflare Workerssrc/- Source code with routes, middleware, and servicesdrizzle/- Database schema and migrationstest/- API tests
ui/- Shared UI components and design system
π Add new dependencies
Pure JS dependencies
For pure JavaScript libraries that work across all platforms (mobile, web, API):
# Install in the root to share across all apps
bun add lodash
# Or install in specific package if only used there
cd packages/api
bun add dayjsThese dependencies work without platform-specific code and can be safely used in any JavaScript environment.
Native dependencies
For React Native modules that require platform-specific code (Android/iOS):
cd apps/expo
bun add react-native-reanimated
# Don't forget to rebuild after adding native dependencies
bun --cwd apps/expo run expo prebuild --cleanNative dependencies often require additional configuration and may need platform-specific setup. Always check the library's installation guide for React Native.
Mobile app dependencies
For React Native dependencies, install them in the Expo app:
cd apps/expo
bun add react-native-reanimatedAPI dependencies
For API/server dependencies:
cd packages/api
bun add honoWeb app dependencies
For Next.js apps (landing/guides):
cd apps/landing # or apps/guides
bun add nextDependency management
Use ManypKG to check for dependency issues across the monorepo:
bun check:deps
bun fix:depsLocal installation π²
PackRat is a modern monorepo with mobile, web, and API applications. Follow the steps below to install and run the applications.
Dependencies
- Bun - Primary package manager and runtime
- Node.js - Required for some tooling
- Expo CLI - For mobile development
- Wrangler CLI - For API deployment
- GitHub CLI - For authenticating with GitHub packages
GitHub Packages Authentication
PackRat uses private packages from GitHub Package Registry. You need to authenticate to install dependencies:
Local Development
-
Install GitHub CLI:
# macOS brew install gh # Windows winget install --id GitHub.cli # Linux - see https://github.com/cli/cli#installation
-
Authenticate with GitHub CLI:
gh auth login
-
Add the
read:packagesscope to your authentication:gh auth refresh -h github.com -s read:packages
-
Dependencies will now install automatically:
bun install
Note: The
preinstallscript automatically configures GitHub authentication using the GitHub CLI token. The script maps your GitHub CLI token toPACKRAT_NATIVEWIND_UI_GITHUB_TOKENwhich is used bybunfig.tomlfor package authentication.
CI/CD
For GitHub Actions and other CI platforms:
- Create a Personal Access Token (PAT) with
read:packagesscope - Add it as a secret named
PACKRAT_NATIVEWIND_UI_GITHUB_TOKENin your repository settings - Pass it as an environment variable in your workflow:
- name: Install dependencies env: PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN: ${{ secrets.PACKRAT_NATIVEWIND_UI_GITHUB_TOKEN }} run: bun install
Note: The default
GITHUB_TOKENprovided by GitHub Actions does not have access to packages in other repositories, even within the same organization. A custom PAT is required.
Environment Setup
- Clone the repository:
HTTPS:
git clone https://github.com/PackRat-AI/PackRat.gitSSH:
git clone git@github.com:PackRat-AI/PackRat.git- Navigate to the
PackRatdirectory:
cd PackRat
-
Set up environment variables:
This project uses a centralized environment configuration strategy. All environment variables are defined in a single source of truth (e.g. .env.local) located at the root of the project.
A .dev.vars file will be automatically generated for development tools.
Run bun install to regenerate .dev.vars whenever environment variables are changed.
Only variables prefixed with PUBLIC_ will be bundled into the Expo app (e.g., PUBLIC_API_URL). These are safe to expose in the client environment.
β οΈ Do not include secrets (e.g., private API keys) in PUBLIC_ variables β they may be exposed in the bundled app.
Git Hooks Setup
PackRat uses Lefthook for git hooks to ensure code quality. The hooks are automatically installed when you run bun install.
- Pre-push hook: Runs
bun formatto check code formatting before pushing - Configuration: See
lefthook.ymlin the root directory
If you need to skip hooks temporarily, use:
git push --no-verifyInstallation & Development
Install dependencies
From the root directory:
bun installRunning the applications
You can run each application independently:
Mobile App (Expo):
# Start Expo development server
bun expo
# Or run directly on device/simulator
bun android # for Android
bun ios # for iOSAPI Server:
# Start API in development mode
bun apiLanding Page:
cd apps/landing
bun devGuides Site:
cd apps/guides
bun devDevelopment workflow
For mobile development, you'll typically run:
# Terminal 1: Start the API
bun api
# Terminal 2: Start the mobile app
bun expoDebugging π
Common Issues
Expo/Mobile App Issues:
# Doctor check for Expo setup
bun --cwd apps/expo run expo-doctor
# Fix dependencies
bun --cwd apps/expo run expo install --fix
# Clean build
bun --cwd apps/expo run expo prebuild --clean
# Clear cache
bun expo --clearDependency Issues:
# Check monorepo dependencies
bun check:deps
# Fix dependency mismatches
bun fix:deps
# Clean and reinstall
bun clean
bun installAPI/Cloudflare Issues:
- Check that your
wrangler.jsoncis configured correctly inpackages/api/ - Ensure your Cloudflare environment variables are set
- Use
bun apito start the development server locally
Code Quality
PackRat uses modern tools for code quality and consistency:
# Format all code
bun format
# Lint and fix issues
bun lint
# Type checking
bun check-types
# Check dependency consistency
bun check:depsThe project uses Lefthook for git hooks - these run automatically on push to ensure code quality.
API Architecture
The PackRat API is built with:
- Hono.js - Fast, lightweight web framework
- Cloudflare Workers - Serverless edge computing platform
- Drizzle ORM - Type-safe database operations
- PostgreSQL - Database hosted on Neon
- OpenAI integration - AI-powered features
See packages/api/ for the complete API implementation.
Contributing π€
Tip
We have an active community of contributors and users who are happy to help. Join us on Discord to get involved!
Contributions to PackRat are welcome! To contribute, follow these steps:
- Clone this repository.
- Create a new branch.
- Make your changes and commit them.
- Push your changes to the remote branch.
- Open a pull request.
- Wait for your pull request to be reviewed and merged.
- Celebrate! π
User Stories:
User Stories π (Click to expand)
User Features:
Registration and Authentication:
- Users can create an account by accessing the menu and selecting the 'Register' option. Additionally, they have the option to sign up directly from the login page.
Main Dashboard:
- On the main page, users have several options to choose from:
- Quick actions
- Search for new trails
- Access other menu options
- View their feed, which displays previously created packs.
- Users can search for a destination directly on the main dashboard, which will then redirect them to the maps interface.
Destination Search:
- Users have the capability to search for a destination directly on the main dashboard.
- Upon initiating a search, users are redirected to the maps interface for further exploration and planning.
Accessing Profile Information:
- Users can conveniently access their profile information from the menu under the Profile feature.
Profile User Overview:
- The dashboard provides users with a comprehensive overview of their profile.
- It prominently displays the user's username and account photo for quick identification.
Favorite Trips and Packs:
- Users have immediate access to their favorite trips and packs directly from the dashboard.
- By selecting the "View details" option, users can delve into more details about their favorite trips and packs.
Profile Management:
- Users can effortlessly manage their profile information from the dashboard.
- By clicking on the settings button icon, users are directed to the profile settings section where they can make necessary updates seamlessly.
Appearance Theme Customization:
- Users have the option to personalize their experience by changing the theme.
- They can choose between light mode or dark mode based on their preference.
- Additionally, users have the option to purchase additional themes for further customization. (Note: This feature may require updates.)
Profile Editing:
- Users can easily edit their profile settings by clicking the "show dialog" option.
- This allows them to update their name and βfood preferencesβ, with a wide range of options to choose from. (Note: This feature may require updates.)
Pack Features:
Pack Creation and Access Settings:
- Users are prompted to input a name for their pack when creating it.
- Users have the option to choose the accessibility setting for their pack, deciding whether it will be public or private.
Adding Items to Packs:
- When users add an item to the pack, they are required to provide:
- The name of the item.
- The weight of the item.
- The quantity of the item.
- The category the item belongs to (food, water, essentials).
- After providing the necessary details, users click "Add Item" to include it in the pack dashboard.
Pack Scoring System:
- Users can view their pack score, which is generated based on several criteria:
- The total weight of the pack.
- The presence of essential items.
- The degree of redundancy in items.
- The versatility of the items included.
Navigating to the Dashboard:
- Users can easily return to the dashboard by following these steps:
- Access the menu.
- Select the "Home" option.
Trip Features:
Trip Creation and Management:
- Users have two methods for creating a trip:
- Directly from the main page dashboard using the quick actions feature.
- By navigating to the 'Trips' option in the menu.
Setting up a Trip:
- Users initiate trip setup by selecting their backpacking destination.
- Nearby trails and parks are displayed for exploration.
- Users can:
- Choose gear from their saved packs.
- Create a new pack and add items directly on the page.
- Select the target date for their trip using a calendar to specify the duration.
- A map showcasing the trip destination is provided for reference.
- Once all details are confirmed, users:
- Save their trip.
- Input a name and description.
- Choose the trip's accessibility setting (public or private).
- A weather forecast and summary of the destination, trails, dates, and trip duration are displayed for easy reference.
Accessing Saved Trips:
- Users can easily access their saved trips from the menu by selecting the 'Trips' option.
- Within the 'Trips' section, users can:
- Organize their trips by sorting them from favorites to most recent.
- Utilize a search bar to quickly locate a specific trip by name.
Viewing Trip Details:
- When users select a trip from the dashboard, they are presented with detailed information including:
- The trip's description.
- Destination.
- Start and end dates.
- Additionally, users can:
- Conveniently view the weather forecast for the selected dates directly on the same page.
- Access the maps interface for further exploration.
- At the bottom of the page, users can find the Trip Score, providing an overall assessment of the trip's suitability and preparedness.
Items Feature:
Dashboard:
- Users are able to view their items used in their saved packs.
- They can sort how many items will show up on screen. They can choose from 10, 20, and 50.
- Users have the option to add new items.
Adding Items:
- User needs to fill out the following fields:
- Item Name
- Weight β they can choose the unit of measurement. Includes lb, kg, oz, and g.
- Quantity
- Category
Feed Feature:
Exploring Backpackers:
- Users can browse through a list of other backpackers.
- Navigate the page using the search and sort options.
Pack List Interaction:
- Upon opening a pack list, users have several options available:
- They can view the profile of the backpacker associated with the pack.
- Users also have the ability to copy the pack list for their own use.
- The pack list includes detailed information such as item name, weight, quantity, and category.
Item Management:
- Users can interact with items on the pack list by:
- Editing, deleting, or ignoring items as needed.
- The total weight of the pack is dynamically calculated and displayed at the bottom of the page.
- Users can easily add new items to the pack list as well.
- At the bottom of the page, users can view the Pack Score.
Returning to Feed Dashboard:
- Users can navigate back to the feed dashboard by accessing the menu and selecting the "feed" option.
π Special Thanks
- React Native Developers
- OpenStreetMap Developers
- RN MapBox Developers
- Cloudflare Developers
- Yusuke Wada - Creator of Hono.js
- Nate Birdman - Creator of Tamagui
- Fernando Rojo - Creator of Zeego
- Tanner Linsley - Creator of TanStack
- Timothy Miller - Creator of T4 Stack
- Expo Developers - Office hours
- Shopify Developers
License π
PackRat is licensed under the terms of the GNU General Public License v3.0. See LICENSE for more information.