Skip to content

sarvottam-bhagat/nestjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

International Student Scholarship Management System

A full-stack application for managing international student scholarships. This system allows administrators to create, view, edit, and delete scholarship opportunities for international students.

Features

  • Dashboard with quick access to main functions
  • List all available scholarships
  • Create new scholarships with detailed information
  • Edit existing scholarships
  • Delete scholarships
  • Modern, responsive UI
  • Form validation
  • Real-time updates

Tech Stack

Frontend

  • React 18 with Vite
  • TypeScript
  • Material-UI (MUI) v5
  • Apollo Client for GraphQL
  • React Router v6
  • date-fns for date formatting

Backend

  • NestJS
  • GraphQL
  • Supabase (PostgreSQL)
  • TypeScript

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v16 or later)
  • npm (v8 or later)
  • A Supabase account (free tier works fine)

Setup Instructions

1. Clone the Repository

git clone <your-repository-url>
cd issm

2. Supabase Setup

  1. Create a new Supabase project at https://supabase.com
  2. Create a new table named scholarships with the following schema:
create table scholarships (
  id uuid default uuid_generate_v4() primary key,
  name text not null,
  description text not null,
  amount numeric not null,
  deadline timestamp with time zone not null,
  requirements text not null,
  country_restrictions text,
  is_active boolean default true,
  created_at timestamp with time zone default now(),
  updated_at timestamp with time zone default now()
);

-- Enable Row Level Security
alter table scholarships enable row level security;

-- Create policy to allow all operations (you can modify this later)
create policy "Enable all access" on scholarships
  for all
  to public
  using (true)
  with check (true);
  1. Get your Supabase URL and anon key from Project Settings > API

3. Backend Setup

  1. Navigate to the backend directory:
cd backend
  1. Install dependencies:
npm install
  1. Create a .env file in the backend directory:
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_anon_key
  1. Start the backend server:
npm run start:dev

The backend will run on http://localhost:3000 with the GraphQL playground available at http://localhost:3000/graphql

4. Frontend Setup

  1. Navigate to the frontend directory:
cd frontend
  1. Install dependencies:
npm install
  1. Start the frontend development server:
npm run dev

The frontend will run on http://localhost:5173

Project Structure

issm/
├── backend/
│   ├── src/
│   │   ├── entities/        # GraphQL entity definitions
│   │   ├── resolvers/       # GraphQL resolvers
│   │   ├── services/        # Business logic
│   │   ├── scalars/         # Custom GraphQL scalars
│   │   └── config/          # Configuration files
│   └── package.json
└── frontend/
    ├── src/
    │   ├── components/      # Reusable React components
    │   ├── pages/          # Page components
    │   ├── graphql/        # GraphQL queries and mutations
    │   ├── types/          # TypeScript type definitions
    │   └── apollo-client.ts # Apollo Client configuration
    └── package.json

Available Scripts

Backend

  • npm run start:dev - Start the development server with hot reload
  • npm run build - Build the application
  • npm run start - Start the production server
  • npm run test - Run tests

Frontend

  • npm run dev - Start the development server
  • npm run build - Build the application
  • npm run preview - Preview the production build locally

Common Issues and Solutions

  1. GraphQL Playground Not Working

    • Make sure CORS is properly configured in the backend
    • Check if the GraphQL endpoint is accessible
  2. Supabase Connection Issues

    • Verify your Supabase credentials in the .env file
    • Check if the database is accessible
    • Ensure RLS policies are properly configured
  3. Frontend Not Connecting to Backend

    • Check if the backend server is running
    • Verify the Apollo Client configuration
    • Ensure the GraphQL endpoint URL is correct

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

MIT

Support

For support, please open an issue in the repository or contact the project maintainers.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published