Movie-Review-site Svelte Themes

Movie Review Site

A simple movie review site built with SvelteKit, TypeScript, and Svelte stores. Users can search for movies, submit reviews, and see average ratings.

HEAD

Movie-Review-site

A simple movie review site built with SvelteKit, TypeScript, and Svelte stores. Users can search for movies, submit reviews, and see average ratings.

šŸš€ Features

Homepage: Displays a list of movies with title, poster, and average rating.

Movie Details Page: Shows movie information (title, description, release date, genre, etc.) and user reviews.

Review Submission: Users can submit ratings (out of 5) and text reviews.

Search Functionality: Search movies by title or genre.

State Management: Svelte stores manage movie data, reviews, and search results.

Responsive UI: Works well on all devices.

šŸ› ļø Setup Instructions

Install Dependencies

Make sure you have Node.js installed.

npm install

sv

Everything you need to build a Svelte project, powered by sv.

Creating a project

If you're seeing this, you've probably already done this step. Congrats!

# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

This will start the SvelteKit development server. Open http://localhost:5173 in your browser.

Building

To create a production version of your app:

npm run build

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment. bad7d98 (Initial commit)

šŸ“‚ Project Structure

šŸ“¦ movie-review-site

ā”£ šŸ“‚ src

ā”ƒ ā”£ šŸ“‚ lib

ā”ƒ ā”ƒ ā”£ šŸ“‚ stores

ā”ƒ ā”ƒ ā”ƒ ā”— šŸ“œ movieStore.ts # Manages movie & review state

ā”ƒ ā”£ šŸ“‚ routes

ā”ƒ ā”ƒ ā”£ šŸ“œ +page.svelte # Homepage listing movies & search

ā”ƒ ā”ƒ ā”£ šŸ“œ movie/[id]/+page.svelte # Movie details page with reviews

ā”ƒ ā”£ šŸ“œ app.html # Main HTML file

ā”£ šŸ“œ package.json # Project metadata & dependencies

ā”£ šŸ“œ README.md

šŸ—ļø Component Details

šŸ”¹ movieStore.ts

A Svelte store that holds the movie list and their reviews.

import { writable } from 'svelte/store';
export const movieStore = writable([...]);

šŸ”¹ +page.svelte (Homepage)

Displays a search bar and a grid of movies.

Uses movieStore to fetch and display movie data.

Filters movies based on user input.

šŸ”¹ movie/[id]/+page.svel``te (Movie Details Page)

Shows detailed movie information.

Displays all reviews and allows users to submit a new review.

Top categories

Loading Svelte Themes