An advanced astronomy companion app empowering telescope enthusiasts with comprehensive sky observation and exploration tools.
- Collimation Guide: Step-by-step visual guide for telescope collimation with the Apertura AD8 Dobsonian
- Telescope Tips: Comprehensive maintenance and usage tips for optimal telescope performance
- Observation Logging: Track and manage your celestial observations with notes and dates
- My Observations: Personal observation history with detailed records
- Comprehensive Catalog: Extensive database of planets, galaxies, nebulae, star clusters, and more
- Multiple Image Sources: High-quality images from various astronomical sources
- Detailed Information: In-depth descriptions and viewing tips for each object
- Filtering & Search: Find objects by type, visibility month, and hemisphere
- Astronomy Picture of the Day (APOD): Daily featured astronomical images and explanations
- Real-time Data: Fresh content updated daily from NASA's official API
- Cached Performance: Smart caching system for optimal loading times
- Monthly Sky Guides: Detailed guides for what to observe each month
- Educational Content: Learn about different types of celestial objects
- YouTube Integration: Embedded educational videos and tutorials
- React 18 with TypeScript
- Vite for fast development and building
- Tailwind CSS for responsive styling
- Shadcn/ui component library
- Wouter for client-side routing
- TanStack Query for data fetching and caching
- React Hook Form with Zod validation
- Node.js with Express
- TypeScript for type safety
- PostgreSQL database with Drizzle ORM
- NASA API integration
- Python scripts for advanced data processing
- Drizzle ORM for database operations
- Zod for schema validation
- Lucide React for icons
- Date-fns for date handling
- Framer Motion for animations
- Node.js 20+
- PostgreSQL database
- Python 3.11+ (for NASA API scripts)
- Clone the repository:
git clone https://github.com/yourusername/astronomy-companion-app.git
cd astronomy-companion-app- Install dependencies:
npm install- Set up environment variables:
cp .env .env
# Edit .env with your database connection string- Set up the database:
npm run db:push- Start the development server:
npm run devThe app will be available at http://localhost:5000
This project is deployed on Vercel with serverless functions.
See DEPLOYMENT.md for complete deployment instructions.
DATABASE_URL- PostgreSQL connection stringNODE_ENV- Set to "production"PORT- Automatically set by most platforms (defaults to 5000)
The app uses PostgreSQL with the following main tables:
users- User accounts and authenticationcelestial_objects- Comprehensive celestial object catalogobservations- User observation logsmonthly_guides- Monthly sky observation guidestelescope_tips- Maintenance and usage tipsapod_cache- Cached NASA APOD data
GET /api/celestial-objects- Get all celestial objectsGET /api/celestial-objects/:id- Get specific objectPOST /api/celestial-objects- Create new objectGET /api/celestial-object-types- Get available object types
GET /api/observations- Get user observationsPOST /api/observations- Create new observationPATCH /api/observations/:id- Update observationDELETE /api/observations/:id- Delete observation
GET /api/apod- Get Astronomy Picture of the DayGET /api/apod?date=YYYY-MM-DD- Get APOD for specific date
GET /api/monthly-guide- Get current month's guideGET /api/telescope-tips- Get all telescope tips
astronomy-app/
βββ client/ # Frontend React application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Application pages
β β βββ lib/ # Utility functions
β β βββ hooks/ # Custom React hooks
β β βββ types/ # TypeScript declarations
βββ server/ # Backend Express application
β βββ services/ # Business logic and external APIs
β βββ scripts/ # Database utilities
β βββ routes.ts # API route definitions
βββ shared/ # Shared types and schemas
β βββ schema.ts # Database schema definitions
βββ package.json
The app includes TypeScript declarations for image imports:
// client/src/types/images.d.ts
declare module "*.png" {
const src: string;
export default src;
}All database operations go through a storage interface for consistency:
// server/storage.ts
export interface IStorage {
getCelestialObject(id: number): Promise<CelestialObject | undefined>;
createObservation(observation: InsertObservation): Promise<Observation>;
// ... other methods
}The entire application is built with TypeScript, sharing types between frontend and backend:
// shared/schema.ts
export type CelestialObject = typeof celestialObjects.$inferSelect;
export type InsertObservation = z.infer<typeof insertObservationSchema>;npm run dev- Start development servernpm run build- Build for productionnpm run db:push- Push schema changes to databasenpm run db:studio- Open Drizzle Studio for database management
The app is configured to run on Replit with automatic workflows and port management. For local development, ensure PostgreSQL is running and properly configured.
This project follows modern React and Node.js best practices:
- TypeScript for type safety
- ESLint and Prettier for code quality
- Modular component architecture
- RESTful API design
- Responsive design principles
This project is open source and available under the MIT License.