@sanjay230304/fswd
v1.0.0
Published
Full Stack Web Development lab practicals, exercises, and interactive installation CLI
Maintainers
Readme
FSWD Practicals (@sanjay230304/fswd)
Full Stack Web Development (FSWD) laboratory practicals, templates, and interactive command-line installation tool for students.
Overview
This package contains full-stack web development practical exercises ranging from foundational HTML5/CSS3/Bootstrap to dynamic DOM manipulation, jQuery AJAX, React components, and full-stack Node.js + Express + MongoDB CRUD applications.
It includes an interactive zero-dependency CLI (fswd) that allows students to inspect and copy individual practicals or the entire suite into their current working directory.
Practicals Catalog
| Practical ID | Source File / Folder | Technology Stack | Description |
| :--- | :--- | :--- | :--- |
| 1-3 (or 1, 2, 3) | prog123.html | HTML5, CSS3, Bootstrap 5 | MCU Website portal, CSS Box Model demonstration, and Bootstrap responsive registration form. |
| 4-5 (or 4, 5) | prog45.html | Vanilla JS, DOM, FileReader API | Interactive student registration form with photo upload preview, profile card, and Show/Hide DOM controls. |
| 6 | prog6.html | jQuery 3.7.1, AJAX, FakeStore API | Asynchronous product catalog loader using jQuery AJAX and dynamic cards. |
| 7 | prog7.html | Vanilla JS, RegEx | Client-side form validation verifying mandatory fields and valid 10-digit phone number. |
| 8 | prog8.html | JavaScript (ES6) | Object array manipulation and dynamic rendering of student records. |
| 9-10 (or 9, 10, mcu-app) | mcu-app/ | React 19, Vite | Full Single Page Application demonstrating modular React components and props for student records. |
| 11-12 (or 11, 12, prog11-12) | prog11-12/ | Node.js, Express 5, MongoDB, Mongoose | Full CRUD REST API with embedded web interface for student record management. |
Installation & Usage
1. Direct Execution via npx (No Install Required)
You do not need to install anything permanently. Run commands directly using npx:
# List all available practicals
npx @sanjay230304/fswd list
# Install a specific practical (e.g. Practical 6)
npx @sanjay230304/fswd install 6
# Install multi-program files
npx @sanjay230304/fswd install 1-3
npx @sanjay230304/fswd install 4-5
# Install nested application projects
npx @sanjay230304/fswd install mcu-app
npx @sanjay230304/fswd install prog11-12
# Install ALL practicals at once
npx @sanjay230304/fswd install allConvenience Shortcut: You can omit the
installkeyword:npx @sanjay230304/fswd 6
2. Global Installation (Direct fswd Command)
Install globally to make the fswd command available anywhere on your machine:
npm install -g @sanjay230304/fswd
# Now you can use fswd directly:
fswd list
fswd install 6
fswd install mcu-app
fswd install 11-12
fswd install all3. Local Project Installation (npm install)
You can also install the package as a project dependency:
npm install @sanjay230304/fswdImportant Note on
npm installvs CLI Installation: Runningnpm install @sanjay230304/fswddownloads the package into your project'snode_modules/folder. It does NOT copy the practical files directly into your workspace root.To copy the actual practical files into your current working directory, run:
npx fswd install <id>
CLI Options
| Flag | Description |
| :--- | :--- |
| list, ls | Display the practical catalog and available aliases. |
| install <id> | Extract and copy the specified practical into the destination directory. |
| -d, --dry-run | Preview which files would be created without writing any files to disk. |
| -f, --force | Overwrite existing files without confirmation prompts. |
| --dest <path> | Target directory to install into (defaults to current working directory). |
| -h, --help | Display usage and help manual. |
| -v, --version | Output package version. |
CLI Safety Features
- Overwrite Protection: If a destination file already exists, the CLI asks for confirmation before overwriting. If run non-interactively without
--force, existing files are safely skipped. - Path Traversal Guard: Destination paths are validated to prevent writing outside the intended target folder.
- Clean Copies: When copying nested applications (
mcu-appandprog11-12), localnode_modulesand cache artifacts are automatically excluded.
Running the Practicals
HTML/JS Practicals (1 through 8)
- Open
prog123.html,prog45.html,prog6.html,prog7.html, orprog8.htmldirectly in any web browser, or serve using VS Code Live Server.
Practical 9 & 10 (React + Vite)
cd mcu-app
npm install
npm run devOpen http://localhost:5173 in your browser.
Practical 11 & 12 (Express + MongoDB)
Ensure a MongoDB instance is running locally on port 27017:
cd prog11-12
npm install
node server.jsOpen http://localhost:3000 to interact with the API and student dashboard.
License
MIT © Sanjay R
